Every project says error after Android ADT update - android

I updated to the newest Android ADT and now every project in my workspace says error though there isn't any in the actual files. Even a clean Android project says error even though I have double checked all the preferences and I haven't found any fixes though I have investigated every possible help forum many times.
I have gotten many random error messages and here are just a few: "Current file is not a match for the given config.", "Conversion to Dalvik format failed with error 1" (not anymore), "Invalid preference page path: XML Syntax", "Failed to load properties file for project *" etc.
All my projects worked before updating.
None of the following works:
Cleaning the project, deleting the project and importing again, deleting libraries and temporary files and fixing project properties, unchecking the Is Library, updating the ProGruad, updating the Eclipse, moving Eclipse to C:\Eclipse, changing API levels and supported Android versions and so on...
I have fought with this problem for some time now.
EDIT:
The following things don't work either: Removing LibraryName_src files (my project has none).
EDIT:
I unchecked a checkbox in the general preferences which made Eclipse to delay the packing (I'll check the name of that checkbox later) and the current errors went away but now it says that "Could not find *.apk!"

I had weird errors too after updating my ADT plugin.
I solved it by performing an Android clear.
To do so just right click on yout Android project:
- Android tools
- Clear Lint Markers
It worked perfectly for me.

Recently had a similar problem. Try this:
Problem after recently after updating the ADT for Eclipse:
In your app project, check for any linked source folders pointing to your library projects (they have names in the form "LibraryName_src").
Select all those projects, right-click, choose "Build Path"->"Remove from Build Path".
Choose "Also unlink the folder from the project", and click "Yes".
Clean, rebuild and redeploy the project.
It seems the reason is that some previous version of ADT linked Library project source folders to the "child" projects, and the current ADT/Dex combination isn't compatible with that solution anymore.
(Solution found here: "Conversion to Dalvik format failed with error 1" on external JAR)

I solved it!
My jump from ADT 13 to 15 was too big. I backed up my workspace, removed everything releated to android and made a totally new SDK and Eclipse install.
After that I still got an error but deleting debug.keystore removed it.

I used Eclipse Indigo (version 3.7) and updated the CDT (instead of ADT) plugin to the latest version (cdt-master-8.0.1.zip). I experienced the same build path issues for all the existing projects that were working before I did the update. The issues that I faced were two folds:
The required source library link is missing from all the projects.
I lost my default Android SDK location in the Eclipse settings.
Here is how I fixed these two problems:
For Problem #1:
In Eclipse, click on the “Problems” tab to show the list of build errors.
Find an error that indicates certain class is not found. For example: “ClassABC cannot be resolved”
Double click on that error line would bring up the source code with the offending line, with a red dot x mark on the left edge of that offending line.
Double click on that red dot x mark would bring up a list of suggested solutions. At the bottom of the suggested list is the item of “Fix project setup…”.
Double click on the “Fix project setup…” would prompt you to add the link source library that is needed for the current project. Simply add that missing library to the project build path and click OK.
Now, do a “Refresh”, “Clean” and “Build Project” should give you a clear build, if nothing else causes errors.
For Problem #2:
In Eclipse, select from the menu bar “Window/Preferences…”, and then enter the missing Android SDK location. Click on OK button. That’s it.
These two steps basically restore all of my projects to the normal condition.

So if anyone is has been struggling with this after the latest ADT Plugin revision 22.
Be sure to install the Latest platform-tools as well.
To do this
Go to C:{Android SDK Location}\android\SDK Manager
And install the missing packages

Related

Android : R class stopped getting generated

I am a newbie to android programming .I was doing tutorial from Commsware tutorial , to be precise T3 tutorial during which I cleaned the project.After that R class file has stopped generating.
I deleted that project,looks like the same error is getting propagated to other new projects I am creating.
This error is coming for the newly created project also.
I tried all the solutions in stackoverflow like : cleaning project,selecting android version in build path , deleting my workspace,freshly install eclipse etc..
The other intimidating thing is my res folder does not show any errors and my xml file does not contain any capital letters.
It must be some silly error which is causing this?
Perhaps you should take a look at this if you've recently updated SDK tools.
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.
this happened to me after updating the android dev kit and esclipse.
couple of things you should try.
if you updated ADT, you must restart ADB server. you probably haven't read the message that says after update. or maybe restart whole pc.
if you're using external jar files, rename the libs folder to lib and revert it back to libs (from eclipse, f2)
There seems to be a problem with the target build settings within your projects.
The R file will not be autogenerated if there is the slightest error in your project. E.g if you use elements in a layout xml file that are available only in Android 2.2 but your project targets android 2.0. Sometimes the offending elements don't show up as errors because, syntax-wise, they are correct.
I advice you look at your target builds in android manifest.
Or target a higher android build (Get the latest one via SDK manager)

Android NDK - Eclipse can't include jni.h

So I'm using Eclipse 4.2 to build my projects which imports native functions in Java.
Everything build fine with eclipse and yesterday everything worked fine.
Today my eclipse stopped to resolve jni.h headers and others android header and shows me errors.
My project builds correctly but eclipse forbids me running application with message saying that there are errors in my application.
I have all paths to symbols in project paths and symbols c,cpp.
And it was working without errors... My only solution right now is to build project, then restart eclipse and run application...
EDIT: oh... It's funny... Now eclipse doesn't start android emulator when i click run as...
EDIT2: even when I create new project...
EDIT3: Its funny... I had to add in avd device... I don't know how it is possible but for two days I've been using it without device in avd and it was working... (I haven't change api or anything like this and I haven't touch AVD Manager)
EDIT4: Strange things happenes in eclipse... I still don't know why eclipse has problems with includes...
It's a bug in ADT 20. Refer http://code.google.com/p/android/issues/detail?id=33788
Go with Alex' adwise until ADT 21 or a patch for ADT 20 is released.
[edit] BTW: you can always simply delete errors in the Problem list ;-)
You can go to Project|Properties|C/C++ General|Code Analysis then uncheck everything in there. That will provide for running your app until you figure out the proper fix.
You can do this by choosing Properties for the project
Properties -> C/C++ General -> Preprocessor Include..-> Entries -> Setting Entries -> CDT User Setting Entries
Add -> Include Directory -> File System Path, and enter the path of the includes like:
${NDK_ROOT}\platforms\android-5\arch-arm\usr\include
Also I found that this working for me only if I checked "Contains system headers" checkbox.

Problems after updating to Android SDK 20 in Eclipse

I updated tools in my Eclipse first by going to Help->Check For Updates and installing everything i that it suggested. Then by going to Window->Android SDK Manager and updating multiple things including my SDK version.
After I have finished my update all my Android projects got a nice red box with an x inside it. I explored the projects and noticed that none of them had any errors inside the project just the project itself had the error icon. I searched online and i found that other people had similar problems. So i thought i found the solution. Alas after cleaning and building the project I got additional error icons next to multiple java files in my projects. Eclipse cannot locate the automatically generated R files when it tries to import them and all the imports are selected red.
I tried deleting the whole content of .android directory (starting with specific few files then the whole content) but that did not bring desired results.
So i have deleted the newly generated files and restored all the old ones.
When I clean and build the projects again all the errors disappear but only until I try to run the project again and then same error appears:
Your project contains error(s), please fix it before running it.
I have also found a related question. It claims that there must be a problem with my xml files. I did not modify any of my xml files since updating the tools so I dont know what could cause them to have errors.
Any ideas as to what is going on??
I've found that eclipse is now picking up errors that it didn't pick up before, because they updated lint, you may have to check all your files and see if there is an error because of this, if it doesn't work try removing Android from the build and reattach it, clean the project, build project, make sure the activities are using the right R files and check what lint says, its like a little square with a tick in it I think.
I had exactly the same problem, solved by removing any imports of R in my code and then cleaning the project
Strangest thing just happened. Even though I have done this 2 times before I have again deleted all my files in .android folder exited my Eclipse and opened it back up again. All the errors were gone and most of my projects work correctly. I have spend a lot of time on this problem and i dont know how it got resolved but Im glad its working again.

Eclipse: Java Build Path is missing

I'm trying to use Google's SDK Tutorial for Android using Eclipse. I was able to get the first two projects to work, but when running the third R.java disappeared so I gave up on that.
I made a brand new package out of the solution set for exercise 3. It was full of errors, like files being in src/com/android... instead of com/android. I fixed that, but it still wouldn't build.
I went to the project -> properties -> Java Build Path, but Eclipse throws an error: "The currently displayed page contains invalid values." It then doesn't load up that window at all.
What am I doing wrong? How can I import this project properly?
Please check your Window>Preference>Android>sdk location --- is set to be the path of android sdk and if it not works then please go with new eclipse software delete previous check jdk is install and after that set correct android sdk location to above path.
Thanks
If the first two projects still work, then your studio is probably deployed properly.
You might want to check if you have a build target set.
Right click on project->android->target name.
Otherwise, might make sense to re-download eclipse and reinstall the google adt plugin.

Not able to create new android project in android

eclipse is working fine with importing a project which already exist. But i am facing problem while am creating a new project in the android.
And then am trying to change the path in the properties of the project which i have created then it is showing some kind of error and screen shot of it is
Can any one help me in this.
Assuming your d: drive is an actual hard drive you have the android-sdk in, and not some DVD/CD drive you tried installing the android-sdk from.
You should click on your new android project folder, right-click and click on "close unrelated projects", then the right files will get generated correctly (re-initiate a manual rebuild if you have to).
The problem was that Eclipse was trying to rebuild all the projects you had in your workspace, a number of which already contained errors in them. Not only those other projects were clogging up your error log, but when an error is detected by the packager/builder, the building process gets stopped entirely.
Now just in case this wasn't your only problem, do Help > Check updates
After that, click on the menu Window > AVD Manager and something
and make sure that you have the latest SDKs and AVD updates already installed.
Also be aware that Pulsar is not the recommended version of Eclipse for doing Android development, although this probably wasn't what was causing your problem.

Categories

Resources