Eclipse Upgrade Not Working - android

My Eclipse out of the blue stopped building my Android so I removed the old version and have installed Indigo. When I try to import an Android project in I get this error:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Android Pre Compiler' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Java Builder' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Please help!

Try removing the .metadata folder from your workspace. This holds all your configurations, even after a new install. I think if you just delete this folder, assuming everything is in place, you should be up and running again.

The 21.0.1 version of the Eclipse ADT tools has a bug that prevents a project building if you have any files without extensions in them. This is a particular problem for users (like me) using subversion which has extenion-less files.
The solution is to install the 21.1 preview version of the ADT tools and SDK manager from Google. Clear instructions can be found here and you can read all the background add your voice to the angry mob of developers here.

This happened to me today with ADT v21.0.1-543035 and it turned out to be the .svn directories throughout the directory structure. See http://code.google.com/p/android/issues/detail?id=42051
Worked around the issue by upgrading svn client and working copy to 1.7.

For me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. It's not an Android project, but for some reason the newer version of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties file from an Android project to the host unit test project.

I had something similar. The problem was created by having some files without extension inside the /src folder.

In my case, a branch tool, changed the encode of the file project.properties, I changed the encode to Windows-1265 and the problem was solved.

I had the same issue and fixed it by following comment number 6 in this page:
Issue 42051: Subversion folder causes NPE in PreCompilerBuilder
Let me quote the comment:
Solved it by installing subversion support packages for eclipse:
http://gan.so/VgYT
It's still a bug but...

same problem here, I closed Eclipse, manually removed any files in folder gen for the project, started Eclipse again, and made a build.

For also me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. I added it and problem got fixed.

I found the solution on this website(https://code.google.com/p/android/issues/detail?id=68755)
So basically, what we should do is :
Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor. Before the -vmargs line, insert these two lines:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
you can find the eclipse.ini following this
(On a Mac OS X system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the MacOS folder under Contents)

Upgrades did not work for me (on Linux), so I just installed IntelliJ Idea (build 123.155). Had to modify idea.sh to set JDK_HOME=/usr/lib/jvm/jdk1.7.0 (the Oracle JDK) and to select [menu] -- Run -- Run... -- Edit Configurations... -- Target Device -- USB device to make it work with the real device.

Related

what is packaged_resources?

I am new to Xamarin for visual studio , when I tried to build the auto generated app from visual studio 2015 without any editing it just did not build and those errors occurred :
*Severity Code Description Project File Line Suppression State Error The file "obj\Debug\android\bin\packaged_resources" does not exist. App1
*Severity Code Description Project File Line Suppression State
Error "aapt.exe" exited with code -1073741819. App1
I tried many solutions from those who had the same problem but I can't seem to find any solution that actally works for me.
One additional detail that is not mentioned but might be a part of the problem is that the resource files can only contain 'a'-'Z', '0'-'9' and '_' characters. A single resource file can ruin the whole build, which is exactly what happened to me. I suggest to anyone running into this mistake to double check the file names of resources.
Same problem with me. It seems it´s a bug.
Lots of posts out there:
https://forums.xamarin.com/discussion/65862/i-cant-build-any-android-project
At this one I´ve seen a light and worked for me:
https://bugzilla.xamarin.com/show_bug.cgi?id=39910
In short:
Close VS
DEL your folder C:\users\\appdata\local\xamarin
DEL your project sub-folders BIN and OBJ at Droid and IOS
Use Nuget to update your projects packages
Update Android Studio SDK if neccessary
Reopen VS and rebuild your solution.
I hope you have same luck... It was really annoying...
Please let us know. Bye.
Ran into the same problem. After toiling on it for a while, I finally found a viable solution. Apparently, this is like caused by a bug in Android Build Tools 24.0.0. And removing those from the system should solve the problem. A bug has been reported, you can find more details on the link below:
https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/
Installing an older "Android SDK build tools" Version was the solution for me.
Start the SDK Manager (in VS 15):
Tools -> Android -> Android SDK Manager ..
Install "Android SDK Build-tools" version 23.0.1
Uninstall all other "Android SDK Build-tools" versions
Build -> rebuild the project / workspace
(Even safer: run a clean, restart VS, run build)
This was successful with:
Android SDK Tools 25.2.3
Android SDK Platform Tools 25.0.1
Android SDK build tools version 23.0.1
If that works, you can test newer build tools.

Errors running builder 'Android Resource Manager' on ADT

I am facing a problem when I try to create new android project in eclipse adt plugin tools.
ERROR/EXCEPTION::
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'test'.
java.lang.NullPointerException
I have faced this problem two times previously. Only solution was to re-install Windows operating system which actually did solve the problem. But I want a real solution without re-installing Windows.
Switching to a new workspace worked for me.
File-> Switch Workspace.
found a better solution. in the create project wizard. don't create an activity in the wizard. just untick create an activity and just create the activity manually in the manifest.
I guess you upgrade your java to java7u55.
because I am using mac, but, FYI
I solve this by edit eclipse.ini, force the ide to use java 1.6
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java
you could try the same.
In my case, the error was solved by changing the workspace folder permissions with chmod 777.
I am using Mac OS X and downloaded the ADT bundle for Mac.
If you close eclipse and then look in your system processes and still see adb running, then that's the problem - it crashed. In my case it was because I have extension files for other programs in my JRE that the adb doesn't seem to like. Remove all your ext files, force shut down your adb.exe and then restart eclipse.
Root exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Priority
Usually this means that they have one more time introduced a bug.
The "magic passes" that may help or not help are:
Pressing F5 (refresh)
Updating Android, Eclipse and ADT (knowing that you do have such a problem, I myself definitely will not do any such updates in the near future)
Creating a project from the command line, building it and trying to import
If you have any project that already works, you may try to take files from that project.
Read the logs, they are usually more informative than just the last 30 lines, but on Windows you will have to either configure the screen buffer height to be about 300-600, or redirect the output to a file.
Clean and build again.
You usually get this after an SDK/ADT update.
Go to your SDK manager and ensure that there are no updates. Then in Eclipse go to Help > Check for Updates and install any updates it finds.
Restart eclipse and hopefully it should all work.
Failing that uninstall Eclipse and re-install Eclipse and the plugins again should fix it as well, no need to re-install your whole PC.
I use maven to build and integrate android projects with jenkins/netbeans. For editing android resources, I often use Eclipse because of the ADT plugin and better android resources support.
Eclipse (Kepler) has serious problems when you import maven-based android projects. It expects the project.properties file in the root folder and will NOT generate it on its own no matter what. Example content:
# this file is needed by eclipse (adt plugin).
# Project target.
target=Google Inc.:Google APIs x86:19
Additionally, create a sym link called "gen" pointing to target/generated-sources/r if using maven to build the android project on the command line. That way, you should be able to do "File->Import...->Existing Android Project". You get an error message, but it didn't matter in my case.
Additional hints in case you have problems with m2e-android plugin:
always check that the output folders for source dirs and resource dirs are correct.
check that source dirs are set as source dirs (you usually get a corresponding warning)
if resources from dependencies are not included in the final apk, check the filter settings for your resource dirs
you may need to "import maven project from existing sources" before importing it as android project from existing sources.
make sure dependencies are imported into the workspace and open and referenced (project props -> android -> add lib)
eclipse adt does not support aar libs, use apklib instead
It can happen if you are changing the location of files that your
eclipse project uses.
In that case you can copy the files directly to your resources folder inside the workspace instead of linking them with "import"
These simple steps put me out of this trouble -
In Eclipse, Help menu -> Check for Updates.
Select all Android related plugins.
Click Next, Accept the agreement page then proceed to install the
plugin.
Make sure your java path points to the java SDK bin directory.. make sure you have installed the latest JDK t be safe..
You can also try one of these:
Close and open the project in Eclipse
Click right on the project and choose: Android Tools -> Fix Project Properties
I beat my head against a wall for a day because of the same problem. My solution (OS X): I had a stale "java_home" definition in my profile pointing to a dead symlink, as well as old classes in /Library/Java/Extensions. I removed the definition and symlink, along with two classes in Extensions (ActiveMQ and Geronimo, FWIW) and the problem went away. Not sure which step was the actual "rectifier" but if any of those conditions apply, you might want to check them.
I faced same problem on my New Macbook Pro so I just Downloaded JDK and installed it and problem fixed.
I was experiencing the same issue - I refreshed and updated Eclipse and Android plugins and was still seeing the NPE. What worked for me was changing the order of operations.
In order:
1. update Eclipse & Android plugins
2. after the update has completed, perform the F5 Refresh in the current workspace
Make a copy of your project in Explorer/Finder. Delete the project in ADT/Eclipse. Import the project again using Eclipse. Project/Clean then build. This works for me.
I have tried every solution I found on the web and they did not work.Then I remember java version on my Mac was 1.7 and I have installed subversion version 1.6 and the problem occured after that installation.Also I have deleted eclipse and used a clean eclipse and Android sdk installation I still got the problem, then I uninstalled the JDK 7 as it is told in here http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html and my problem is solved.
I have several projects in my folder. Every time I start a new one I close the others. I got this error because appcompat_v7 was closed.
Right click on appcompat_v7 and select Open Project.
This solved my problem.
Solved after changing a setting in eclipse.ini. I am using OS X 10.11.4 and Eclipse Mars 4.5.2.
Go to the folder of Eclipse.app in Finder.
Right click to open a menu, and click Show Package Contents.
Go to /Contents/Eclipse.
Open eclipse.ini in your favorite text editor.
change -vm path like below:
BEFORE: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin
AFTER: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/bin
reopen Eclipse.
enjoy :D

Eclipse giving error, missing R.java file after recent update

I have updated my SDK and ADT to the latest version, I have also update the Eclipse to Kepler the latest one after Juno.
My ADT version is 22.0. After this update when I create a new project, I'm getting error, stating R cannot be resolved to a variable. I have imported import android.R;, but it is showing as unused import stating Don't include android.R here; use a fully qualified name for each usage instead.
Same thing is happening with Mac OS also with the latest update. I have tried renaming activity_main.xml to other name, but still my R.java is not generated.
Tried all the things which are possible. Cleaned the project, build the whole workspace. Nothing helping.
I think ADT or Eclipse compatibility is having problem after the update.
I have updated my whole SDK, here is the screenshot, but same problem is there.
After updating to SDK Tools to rev. 22 for the first time, you may need to relaunch Android SDK Manager again and install a new item: Android SDK Build-tools.
After installing this, clean your projects and rebuild.
Yesterday, I made an update with sdk manager, and I had the same problem as you. I fixed the issue: I have updated another time the android sdk (with the sdk manager tool), then I check update from eclipse for install the updated ADT plugin and I rebuid my project. "Android sdk Build-tools" from Android sdk manager is now rev 17 and now it is OK. I think the issue is from adt plugin from eclipse
import android.R - remove this statement from all your classes and then do a clean your R file will be generated. if this did not work then check all your xml files for any errors and then do a clean. These 2 are the most common reasons for R file to go missing
Changes in your Build target also can effect R.java in Eclipse so
Right Click Project >> Properties >> Android >> Select Latest(usually) Android API Platform >> Click OK
Hope this is helpful.
Follow These steps...
Right Click Your Project.
Select Properties->Android Check Project Build Target and API Level.
Again come back and open Android Sdk Manager Chekc the Tools and make sure you are installed Curresponding Android SDK Build Tools.
Eg : IF you selected api level 17 in properties you should install Android SDK Build Tools 17..
Try this:
make a backup of your projects on desktop
close eclipse
delete your workspace
restart eclipse and import your projects again.
I had same problem.. I solved by doing the following:
check all xml files and drawable files if there are any CAPITAL LETTERS in file name, if you have then change it to lower case, if you are using selector xml files then check the other files you are linking in those files..all should be lower case.
Go to java files which show error and remove IMPORT R.java file from imports list.
Go to Projects>>Clean.
This should fix the problem. This is how i fixed :)
My issue was that I had android:orientation misspelled in my activity_main.xml file and I was getting this error. I fixed the spelling and problem went away! So make sure activity_main.xml doesn't have any errors in it.
Sometimes when you extract your file it miss some part so better when its extracting make sure all file are extracting properly and then run eclipse after that run a simple file and install plugin of avd
it helped in my case
if the problem persists then try closing the other projects by
right click -> close Unrelated projects !
this worked in my case
For eclipse users:
Comment the lines including R.*
Clean and build.
R.java will be generated and then uncomment the R.* and rebuild.
the best solution for r.java missing for linux...
R.java is self generated in gen folder.. so better dont edit or create manually by urself ..
-open terminal(alt + ctrl + t)
-change directory to skd->tools
-then provide executive attribute to all executable file by(sudo chmod +x filename)
-do the same for files in sdk->platform tools .. (ie sudo chmod +x filename) ..
-----every executable file sud b provided with +x attribute...
just delete gen folder all of your error will be cleared
Proven successful method, check the file (AndroidManifest.xml) and delete all comments in it, and make sure there are no errors in this file, I tried and did work with me.

Android Studio build error or misconfigured

I am having trouble building with Android Studio on one of my computers. The same project was building fine and when I pushed to github and pulled from the other machine I get the following error
Argument 0 for #NotNull parameter of com/intellij/execution/configurations/GeneralCommandLine.setExePath must not be null
I tried generating a new default project and I get the same build error so it must be something with my setup.
Does anyone know what I can do to fix these issues? Or even how to completely uninstall Android Studio and start fresh? Thanks
I had same error. In my case it was caused because of modification some important configuration. I fixed the issue by executing following steps:
File -> Other Settings -> Default Project Structure
SDKs
Add new SDK (select JDK option)
Specify path to JDK (in my case it was "C:\Program Files\Java\jdk1.7.0_45")
Save changes
You can also check if you have configured path tho the Android SDK
Good luck!
Had the same problem. Had to uninstall Android Studio, delete all files related to it including install files, the .AndroidStudioPreview folder under your user directory, and those files made in your project's folder upon importing. This amounts to the idea folder and the [projectname].iml file. Now reinstall and re-import the project. You can reuse the same build.gradle. Mine's working now.

Android ADT Eclipse plugin, parseSDKContent failed

I've just set up my first Android development environment consisting of
Eclipse 3.5
Mac OSX 10.5
Android SDK for x86 macs
ADT Eclipse plugin 0.9.6
I've set set $PATH to my SDK/tools directory (which shouldn't matter if I only use Eclipse right?) and started Eclipse, but when I try to set the path to the SDK in Eclipse, i get the error "parseSdkContent failed". The stack trace of from the thrown exception is
java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:181)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDevicesXsd.getValidator(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.parseLayoutDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.loadDefaultLayoutDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.loadDefaultAndUserDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.Sdk.<init>(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadSdk(Unknown Source)
at com.android.ide.eclipse.adt.AdtPlugin$13.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I can't see that I've missed anything in the setup process, according to the instructions it should basically just work out of the box. Any ideas as to why this might fail?
So my solution was completely different. The project.properties was corrupted. I had to edit it from the command line as eclipse didn't want to do anything for me. I deleted everything that was unnecessary. So that the file looked like this:
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-15
Closed Eclipse. Opened it again.
I then went back into the project properties and reset my libraries. This solved the problem. Hope this helps someone else!
For me updating the DDMS from ADT plugin did the trick!
Before that for saving time I only updated ADT plugin, nothing else like Android DDMS, TraceView etc. so I ran into same issue, after couple of restarts and Google searches everyone was proposing different solutions. I updated my Android DDMS and restarted eclipse.
And It worked like a charm.
I didn't had to remove my workspace or update my .project file etc.
Step 1. Find the folder named: .android
This folder can be located in your Windows user directory, for example in Windows 8:
C:\Users\YOUR_WINDOWS_USERNAME.android
Step 2. Delete this folder .android
Step 3. Restart Eclipse and it is OK now
A quick glance at http://java.sun.com/javase/6/docs/api/javax/xml/validation/SchemaFactory.html suggests that something is wrong with the JDK 1.6 setup.
Setting the -vm flag in eclipse to the original 1.5 did not help, but after removing all traces of the apparently misconfigured 1.6 everything worked like a charm.
I try removeing all your projects then restart the application
Installed API 19
Deinstalled API 20, 20L
Under Package Explorer|appcompat_v7 Android 4.4.2 didn't show up
Then removed corresponding 20-and 20L-folders in sdk/platforms and sdk/system-images
Restart and ok
ADT Package 23.0.2.1259578
Eclipse Platform 4.2.2.M20130204-1200
On Windows 7 with adt-bundle-windows-x86_64-20140702:
removing
C:\Users\YOUR_WINDOWS_USERNAME.android
did the magic for me :)

Categories

Resources