I am new to eclipse plugin world and I happened to create on hello world plugin.
I am able to give it to my friends by telling them to drop the exported jar (that I exported from my project) in the dropin folder, which works well. But I now want to upload that jar to a web location (say on github) and want them to install it using eclipse-> install new software-> add -> archive option (I think this is how I should let them install for internal usage) . I tried n number of things without success , a simple approach that I tried was to archive local jar from disk through the eclipse-> install new software-> add -> archive-> local option, but I get error "no software site found at jar:file:/{location to my jar folder}/hello-world_1.0.0.0.2015XXXX.jar!/. Do you wish to edit the location?" message .
Any guidance is appreciated.
My plugin.xml
My jar folder structure: META-INF,icons,lib,plugin.xml,hello
Testing on same eclipse were-in the dropin method works.
To be able to install and update you first need to create a Feature project as well that links to your plug-in. Then at first you should use Export... > Deployable Feature, select your feature and set Generate p2 repository under Options. You can generate to a directory first. This will contain:
folder/
+plugins/
+features/
+p2/
-artifacts.jar
-content.jar
You can use this as a local site to install from, and when you upload it to an online location, as an update site.
Once you are fed up with manual exporting, you will learn about maven, tycho and automatic update site creation and upload ;-)
Related
I have been trying to install crashlytics for the passed 6 hours with no succes.
The first time it started downloading some libraries but something went wrong and I had to delete them all again. I'm talking about the ones that it places in the lib folder it creates (not sure of the exact name of that folder).
After that it simply refuses to redownload them and just sits there on the "build and launch the app" window so it can "verify" its configuration.
So here's the issue, because it doesn't download the stupid libraries i can't import them in any of my classes or use them.
Fabric.with(this, new Crashlytics());
gives errors ofcourse because it can't resolve "Fabric" or "Crashlytics". Why the people at crashlytics don't give you the simple option to download the jar file(s) yourself is beyond me...
In any case, here's what I've tried:
uninstalling the eclipse plugin
searching for EVERY reference to fabric and crashlytics and deleting them if relevant
deleting all contents and whatnot
deleting eclipse's artifacts.xml file
Since it's a git project I even deleted all the project files, created a new git folder and pulled them again there.
manually attempt to put some of the jars from the plugin folder in my libs folder and adding them to my build path
but nothing works... help?
Follow the steps to integrate Crashlytics to application.
If it is first time then fabric will support you in doing the setup.
https://fabric.io/onboard given option to select SDK.
Select SDK and started integrating.
Successfully able to add plugin.
After SDK restarts, clicked on the Fabric toolbar button to start using Fabric!
Logged in -> Selected project -> selected kit to install.
Follow all the steps initiated by tools.
change of android-manifest file.
add code in the java class.
add shown code to kits.properties (Eg: com.crashlytics.sdk.android:crashlytics:2.2.2)
Final step will show you the done. (If you haven't done the three steps properly in step 6 then you can't be proceed further).
How do I export a project in ZIP format in Android Studio?
I have always worked with Eclipse that has this feature.
Starting with Android Studio 3.0, you can use File | Export to Zip File... to export your project. If you're using an older version, you can use the file manager of your operating system to pack the directory of your project into a .zip file.
In Android Studio 4.1 the export as ZIP option has been moved to File - > Manage IDE Settings - > Export to Zip file
If you want to export your project to a .zip you'll need to upgrade your version of Android Studio to version 3.0
right click on app folder
then send to
then compressed via zip
Go to File
Choose option Export to Zip File
Note:
This option is removed in Android Studio 4.1
You can first push the project to Github and then download the project as zip. Only the necessary code will be pushed to Github, hence making it easier for others to go through the code.
Steps to push to Github:
1. In the Project Window, select Android. Only the app folder and necessary code can be seen.
2. Click on VCS -> Import from Version Control -> Share Project on Github.
3. Enter project name and description.
4. Enter a commit message. You can select/deselect files to be pushed.
Note: You will have to setup Github first in Android Studio.
After this you will see a notification on top right of the IDE saying 'Project pushed to Github' and a hyperlink to the Github repository.
You can then download the repository as zip. This might seem to be a long process but it would help in the long run as your code can be easily managed using VCS within Android Studio itself.
File/ Manage IDE Settings/ Export to Zip File...
Choose the directory you want the file to be in
Wabam you got yourself a new zip file :D
note to future viewers: I am on Android Studio Version 4.1.1
Following worked for me, Android Studio 2.0, assuming there are no libs.
A. From the source project
1. Copy /app/build.gradle
2. Copy /app/src/* including subdirectories (only contains manifest, java and resources)
B. Create new project with the same package name, minSDK etc.
1. Replace /app/build.gradle
2. Replace /app/src/* including subdirectories
C. Synchronize
D. Clean Project
Windows:
First Open Command Window and set location of your android studio project folder like:
D:\MyApplication>
then type below command in it:
gradlew clean
then wait for complete clean process. after complete it now zip your project like below:
right click on your project folder
then select send to option
now select compressed via zip
It's easy, if you use git:
git archive -o latest.zip HEAD
Setup Git if you haven't already in Android Studio. Its free. From the terminal provided in the Android Studio go to a new fresh directory. Run this command: git clone <app directory path>
This will copy all the required file to load the project and also the commit history to the current new directory.
I am trying to create a default Eclipse , with all the plugins installed. So that my team always the same eclipse version , and don't have to installed any extra plugins.
Any idea , where I would have to make changes in order to default eclipse with such settings.
Thanks !!!
Assumig "with all the plugins" you mean all of eclipses official plugins: Go To Help->Install New Software, select the Eclipse Update Site (for example http://download.eclipse.org/releases/juno) and install the plugins you need.
If you need other non-official plugins, just install them.
After that you can just zip the eclipse install folder again and distribute it
You can look at creating a "Shared install". This means that you create an Eclipse installation in a read-only location on a shared drive that all devs have executable and read access to. Then, when a dev launches the Eclipse instance, a custom configuration area is created in the user's ~/.eclipse folder.
This works fairly well. And end users can install their own plugins on top of the base install without affecting others. The only limitation that I am aware of is that some plugins cannot be installed unless the user has write access to the target install folder (Groovy-Eclipse is one example of this because of its use of a feature patch).
More information on shared installs can be found in Eclipse help.
I follow this tutorial: http://software.danielwatrous.com/wordpress-plugin-licensing-wicket-on-google-app-engine/. I add google app engine library to this project and then I want to check google app engine on. But when I do this eclipse has this problem:
The App Engine SDK '/home/hudi/program/git/tournamenSystem/tournament-system/
tournament-system-web/src/main/webapp/WEB-INF/lib/appengine-api-1.0-sdk-1.7.1.jar'
on the project's build path is not valid (SDK location '/home/hudi/program/git/
tournamenSystem/tournament-system/tournament-system-web/src/main/webapp/WEB-INF/
lib/appengine-api-1.0-sdk-1.7.1.jar' is not a directory)
I dont understand it. Jar isnt directory so why it want to some directory ? When I want use quick fix then I can just use another SDK. I try to use older version 1.6... but still same problem. How I can fix it ? Please help
Possible solution is that, you should add appengine through app engine settings in eclipse and make sure that the sdk added by appengine setting appear before the one mentioned (i.e. /home/hudi/program/git/tournamenSystem/tournament-system/tournament-system-web/src/main/webapp/WEB-INF/lib/appengine-api-1.0-sdk-1.7.1.jar) in your build path. In this way your application would refer the appengine sdk from google plugin and not for the path which is giving error.
I had same issue where I was getting error for the sdk jar included from maven dependency.Hope it will help.
You may want to take a look at the Maven GAE Plugin
This plugin has goals to run, debug, deploy, etc. your GAE application.
On my computer with Ubuntu 12.04 and Eclipse Juno SR1
I just move all maven dependencies to the button of the list of Java build path.
For open Java build path window right click on the project
- preferences
- Java build path
- Order and Export
- select all row with M2_REPO(or some thing else) and press button "Bottom"
- Refresh project.
This need help.
Thank you!
I'm currently trying to learn to use Guava so I downloaded the source by doing this:
svn checkout http://guava-libraries.googlecode.com/svn/trunk/ guava-libraries-read-only
Sorry if this sounds really stupid but for the life of me, I can't figure out how to load up the source in Eclipse to examine it. I've tried different ways (creating, importing, etc) but always end up with package problems.
I'm using Eclipse 3.5 on Ubuntu by the way.
Can I get some help on this? Thanks!
EDIT: I'm trying to examine the source so I would like to add the source as a project.
Here is what I would do...
Go to the downloads page and grab the latest bundled release
Unzip it to some local directory
Copy the guava-r<version>.jar to your project's lib directory.
Right click on the JAR from Eclipse and say "Add to Build Path".
If you need the source you can attach the guava-r<version>-src.jar in Eclipse via the Configure Build Path project menu or by using the attach source button during debug.
It's easiest to download a Jar from the Guava site, copy it into your Eclipse project and add it to the build path using the jar context menu > Build Path > Add to Build Path. Also, point Eclipse to the included source zip using project context menu > Configure Build Path... to get Javadoc on the Guava classes.
I have done it two ways: the Subclipse and Maven eclipse plugins. Both offer "create project from repository"-like options. Both plugins have reasonable online help, so I'll not repeat exact steps here.
Creating a project from the repositories will give you a full view of the source (and documentation, build files, etc).
I might be a little late in answering ... but you could also simply install the guava bundle from the update site "guava-bundle"; it will install the sources along and you'll then just have to import the plugins in your workspace (File > Import > plugins and fragment... don't forget to tick the "projects with source folder" checkbox on the first page of this wizard) and browse the source from it.
Note that this update site has now been discontinued in profit of Guava-osgi which also provide an update site for easy installation ... but I haven't installed it yet and thus don't know whether the sources are included in the artifacts installed through this update site.