I am unable to fine the option to set annotation processing in my Eclipse preferences.
Not sure since when am I getting this problem but surely it has started to occur after I updated eclipse last.
I also tried pasting the annotations.jar file in tools/support folder but to no good.
Kindly help.
TIA
Installing
Programming Languages > Eclipse Java Development Tools
may enable it again.
It seems Google removed the Annotation Processor option from project properties in the ADT bundle. We are tracking the problem in this AndroidAnnotations issue. The current workaround for this is not installing the bundle, but downloading a standalone Eclipse distribution and adding the ADT plugin to that.
Updating Eclipse Java Development Tools worked for me.
Try This
If annotations.jar is missing, it maybe ADT 23 related problems.
Check this.
Update eclipse with Android Development tools 23
Google response:
...
and copy over the following files:
tools/hprof-conv
tools/support/annotations.jar
tools/proguard
(Added)
If its ADT bundle problem (part of ADT 23 related problem),
this part is for you. (Linked above)
Google response:
...
This is a packaging bug. The entire proguard file is missing. We'll have an update asap, but until then just copy it over from a previous version of the tools:
...
Edit: with the latest ADT release, the bundle should now work with auto-update, so install these new versions:
linux 64 bit vm: http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20140702.zip
linux 32 bit vm: http://dl.google.com/android/adt/adt-bundle-linux-x86-20140702.zip
mac: http://dl.google.com/android/adt/adt-bundle-mac-x86_64-20140702.zip
win32: http://dl.google.com/android/adt/adt-bundle-windows-x86-20140702.zip
win64: http://dl.google.com/android/adt/adt-bundle-windows-x86_64-20140702.zip
Don't try to upgrade from previous version because it doensn't work at all. If you have got problems with zipalign, it's now under platform-tools and no more under tools/ so you can do a symbolic link or just copy it into the expected folder.
or use "not-bundled" Eclipse.
ADT23 problem related links
Issue 72400 (merged into 72419) getDefaultProguardFile no longer returns valid path using build SDK tools 23
Issue 72419 Proguard not installed with SDK tools rev. 23
Copied APTDemo.jar from http://www.eclipse.org/jdt/apt/APTDemo.jar in the lib folder and I can see the option in my compiler preferences. I will investigate later, fixed my problem for now.
Related
I reinstalled 4-5 times the Eclipse Neon (Latest) and I downloaded following SDK's:
SDK Platform API 24 Re. 1
SDK Platform API 8 Rev. 3
Android SDK Tools Rev. 25.1.7
Android SDK Platform-Tools Rev. 24
Android SDK Build-Tools Rev. 24
Android SDK Build-Tools Rev. 23.0.3
Google USB Driver Rev. 11
And I have JDK and JRE 1.8.0 update 92, I use Eclipse Java Neon perfectly errorless.
When I create a project, it looks like this:
And I'm getting following errors:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'zzzzf'.
java.lang.NullPointerException
And it cannot resolve variable R.
After editing project properties, I get this message:
[2016-07-10 00:13:12 - zzzzf] Project has no project.properties file! Edit the project properties to set one.
Also I am getting some kind of errors that I dont remember and Eclipse says "Good news! It seems this bug is fixed on next updates. VÄ°sit null for further information." But when I check the updates, there are no update. -- Errors are about running the workbench.
I tried:
Adding resource filters
Editing eclipse.ini by adding this line before -vmargs
-vm /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home
Thanks for your help and giving a part of your valuable time. I am using AIDE for preparing applications and when I switch to PC, I'm busy with problems instead of Java codes...
Problem is solved by switching to Android Studio, because Eclipse is no longer supported by ADT. So that I am getting rid of that errors.
As of Dec 2016, I am able to create, compile and run Android projects under Eclipse Neon.
My installation details are:
ADT Tools 23.0.7.2120684
Eclipse Platform 4.6.1.M20160907-1200 (Eclipse Neon.1)
Ubuntu 16.04
There are some glitches:
LogCat and Devices views don't render well
Previewing a layout is possible, but you have to choose Android version < 23 in the preview version dropdown
If that doesn't work, you can try this independently maintained ADT as well. I get the same result with this ADT, so I didn't bother using it. It seems to be especially useful for those using Android NDK.
Update:
The Eclipse Foundation also maintains a fork of ADT called AndMore. It works fine with Neon.
For converting existing ADT projects to Android-Neon,
just select "configure-->convert From ADT" from the main popup menu.
Also Neon appears to be able to profile your hardware. I was getting crashes until I simply removed the memory and GC entries from eclipse.ini
When a project is created in Eclipse it automatically creates a folder called
.settings
And files named
.classpath,
.project,
project.properties
You can create a new project using the same package name and just copy the files over into this new project, rebuild it.
The more advanced, more direct and less headache approach is to find a current Eclipse project and copy the above named files over and edit them for this project.
Select your android project and go to
Properties => Java Build Path => Libraries => Add library => Android Classpath Contanier => Next => select your project android
Then push button Finish => Apply and Ok! and your errors is empty.
I hope help you... Good luck
I just updated to Android Studio 2.2.1 for Mac. Then I updated the JDK to version 8. Tried to start a new project and run it. I got the following error:
Error:(1, 1) A problem occurred evaluating project ':app'.
java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
I also tried going back to JDK version 7 as it says on google site that JDK 8 is unstable for Mac. still got the same error.
Check your android build tools dependencies. In your build.gradle if its something like:
classpath "com.android.tools.build:gradle:+"
It has likely downloaded the alpha of 2.2 and that can cause the error you are seeing.
Try
classpath "com.android.tools.build:gradle:2.1.0"
If you are already using the right build tools version but keep getting this error, maybe one of the third party Android libraries you are using is causing the problem due to the same reason. You can force the dependency version to be used (including transitive) by changing
classpath "com.android.tools.build:gradle:2.1.0"
to
classpath('com.android.tools.build:gradle:2.1.0') {
force = true
}
Documentation: gist and official gradle docs.
I was also facing same problem. I upgraded Android Studio and as it forced to But we need to configure same in App Settings as well.
You can try to update JAVA_HOME to point to JDK 8 location.
In my case, I've updated Android studio project's SDK settings, changed java version in my PATH env variable, but still this error occured. Only updating JAVA_HOME helped me.
I was also facing the same problem. I upgraded Android Studio and as it forced to install JDK 8, downloaded and installed this as well. But we need to configure same in App Settings as well.
Select Project [Right click on the app module] -> Open Module Settings -> Select SDK Location from Left Menu - > Configured correct JDK Version i.e removed the old version and updated path of JDK. Save.
Sync Project.
Problem solved!
EDIT: Elaborated Project word.
If you are on Jenkins, check Java version in Jenkins->Manage Jenkins->Global Tool Configuration->JDK
I had to update mine to JDK 8.
I had same error in 2.3 beta 1 ,
Fixed as follow :
Download latest java jdk
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
In Android Studio , go to File > Project Structure > SDK Location > select JDK Location path to point to the new jdk installed (Ex: C:\Program Files\Java\jdk1.8.0_111 )
Done !
Ufff, I changed like everything I was able to find to jdk 8 and still no result but then I found Gradle settings in Intellij (preferences > gradle > GradleJVM) and it was ofc wrong, changed that and woala.
I meet the problem too, but I have changed nothing before it's happening. I think google is purposely. Google is trying to use openJDK instead of JDK because of the lawsuit between google and oracle. So, in the new version 2.2.0 of android, we found that there are some new files in the installed folder:
android studio 2.1 files
android studio 2.2 files
Then, I think we have two method to fix it:
Change the JDK environment variable of your OS.
Just click menu File --> Project Structure, choose Use embedded JDK (recommended). I chose this way and it work.
Good luck...
I had a same problem what is work for me is that .
Go
*File>Settings>(on the panel left)Build,Execution,Deployment . then click on Gradle
There is option to Update Gradle. Click on that it will time 3 to 4min and after that error gone.
The simplest way is to update Android Studio to v2.2.3, it includes a fix of JDK8:
Bug fix for a JDK8/Kotlin compiler + dx issue (issue 227729)
It's solved my problem.
I am having an immensely frustrating issue with Eclipse and the ADT after updating all the SDK's, API's and Support Libraries for Android this week.
Ever since updating everything I am unable to properly create an Android Project in Eclipse. It does not generate the MainActivity.java or the main_layout.xml files at all. I have read through most of the other posts regarding this and the fixes they suggest don't seem to work. I have tried looking for the updated software by going to:
Help --> Check for updates (Everything is up-to-date).
I have also tried the manual way by going to:
Help --> Install New Software and inputting https://dl-ssl.google.com/android/eclipse/
It still says I have the latest version of the ADT.
I have also tried reinstalling the ADT plugin as well, but to not avail.
Trying to create an Activity after project creation also does not work.
Versions of software that I am running:
Android SDK Tools 24.0.1
Android API 1.5 up to and including API 5.0.1
Eclipse: Luna Service Release 1(4.4.1)
ADT Plugin Not sure
Thank you for taking the time to read this.
The ADT and SDK Tools must be compatible. The latest ADT version is "ADT 23.0.4". And the corresponding SDK Tools version is 23.0.5. You have updated your SDK Tools version to 24.0.1, but there are no ADT version can support. So you should roolback to the SDK Tool version 23.0.5.
Here is the link:
https://dl-ssl.google.com/android/repository/tools_r23.0.5-windows.zip
Add an Empty Activity, instead of Blank Activity. This will generate MainActivity.java
What is your Java version? You didn't mention about it. Please check it, it should be Java 7 for Android 5.0. If you have Java 7 then check eclipse.ini file. If it refers to Java 6 then change here also to Java 7.
Google fixed this issue and below link may help you.
https://code.google.com/p/android/issues/detail?id=82393
After getting a new computer and setting up eclipse again, no projects are generating the .R file. The SDK is on revision 22 which I noticed some people had issues with, but setting the Private Libraries checkbox did not resolve this.
The .R isn't generating for existing projects nor brand new empty android projects. The SDK levels between the build configurations and the manifest match.
An entire uninstall of the SDK, and redownloading the Android version of eclipse and SDK didn't work as well. Could it be something with the versions of Java installed on the machine? Or is there some other common cause of the R not generating I missed after searching?
I got the same error as yours.
note:
The SDK directory architecture of 22.0.1 version is different from before.
there is not platform-tools directory and some command file move to other directory.
but,eclipse and ADT plugin does not update according with SDK
so, linking related bin to platform-tools directory will work.
above meet my error.
Update your SDK Tools from the SDK manager and ADT in eclipse, this was fixed in the latest update (22.0.1)
Also, after you update your SDK, close and reopen the SDK and check for updates again (in case you don't see 22.0.1)
Take a look here for some similar issues Class not found error after updating ADT and Android sdk tools to latest ver 22
I am running CentOS 5.5 x86_64 with JDK 1.6, Eclipse Galileo, and the 0.9.7 ADT is installed; however, after installation, the Android project type is not available. I have checked in the installed packages list and it is installed. Anybody encounter this problem before? Could it be due to my use of the 64-bit java VM that is installed on my system?
This usually happens when you dont select any android SDK in "Preferences > Android" You just have to reset the perspective in eclipse, Windows > Reset Perspective.
Hope this is still helpful.
Hope you have already set the Android Preferences if not Window -> Preferences-> Android and browse to the android SDK folder.
In rare cases even after doing this step, Android Project option doesn't show up in File -> New. But you can get it by File -> New -> Project .. and choose the android project from the options displayed.
Ok. I reinstalled eclipse and android. I think the problem was that I hadn't unpacked the android tools first. The plugin was installed, but it had nothing to talk to! Anyway, all the android related stuff now shows up in Eclipse.
Using Windows 7, 64-bit edition, with the latest Eclipse (Indigo) and the latest ADT plugin, I had the exact same problem. No Android project type, no Android in Windows/Preferences.
Like #Rubberman I solved the problem by totally re-installing Eclipse. Eclipse doesn't seem to use the standard Add/Remove Program stuff in Windows; I just deleted the Eclipse install directories and my Eclipse workspace directory, re-installed Eclipse, and re-installed the ADT plugin.
I would have liked to have just removed the plugin and re-installed without deleting the whole of my Eclipse install, but I couldn't figure out a way to do that. I don't see any way to remove a plugin, and when I tried to choose ADT for installation Eclipse gave me an error, saying "I can't install that because it is already installed."
I Know its a very old post..but still it may help someone with same problem...
I wanted to jst share that we can uninstall the plugins without the need of reinstalling eclipps..by simply going to 'already installed application' link and selecting all the android related options and simply clicking on uninstall button..Now you can add fresh android sdk to your ecllips..I have tried it and it works..
Hope, I helped aomeone..:-)
Ok, been looking for the answer to this for an hour, it's not well mentioned.
if you are using linux then you need to add 2 more things to install ADT correctly:
GEF from http://download.eclipse.org/tools/gef/updates/releases
WST Server Adapters from http://download.eclipse.org/releases/galileo/ (modify for your release)
do it the same as the adt plugin install.
maybe you need to uninstall then reinstall the adt plugin after?
sources:
ubuntuforums.org/showthread.php?t=1595684
sonalsantan.blogspot.com/2010/10/eclipse-adt-plugin-on-ubuntu-1010-after.html
You have to install the Eclipse plugin called ADT.