Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Every project says error after Android ADT update

Tags:

android

build

adt

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!"

like image 786
Finnboy11 Avatar asked Nov 21 '11 19:11

Finnboy11


4 Answers

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.

like image 111
YannPl Avatar answered Sep 27 '22 18:09

YannPl


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)

like image 37
Kyle Clegg Avatar answered Sep 27 '22 17:09

Kyle Clegg


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.

like image 41
Finnboy11 Avatar answered Sep 27 '22 19:09

Finnboy11


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:

  1. The required source library link is missing from all the projects.
  2. 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.

like image 43
Shuh Chang Avatar answered Sep 27 '22 17:09

Shuh Chang