Reputation: 14571
I have a main project (mainapp) I am developing for Android under Eclipse. It uses the facebook-android-sdk library (fblib) which is a separate Eclipse project with it's project properties checked as "Library". Under the project properties > android section for mainapp, I have fblib added as a library. everything works fine.
I needed to create a new version of mainapp which uses different database files (assets subdirectory). To do this, I created a new Eclipse project (newapp) and setup mainapp as a library under project properties > android.
Everything was working fine until the latest ADT update. I am getting errors trying to build/run newapp (Conversion to Dalvik format failed with error 1). If I go to mainapp and uncheck "Library" from project properties > android, I can build mainapp as a regular application and it seems to work just fine.
I've searched for multiple jar files in project directories, updated proguard to 4.8beta, deleted/added jars to the build path, removed exports, added exports, deleted dependencies, added "lib" directories, cleaned, restarted, rebooted and pretty much anything else google would turn up, but to no avail.
It was all working fine with ADT 16 so I'm really confused here. Has adding a library project to an application, which also incorporates a library project, become somehow deprecated? I just can't seem to get this working.
Upvotes: 0
Views: 1148
Reputation: 1930
I had similar issues. The issues were because of different build system introduced "Gradle".
Resolution: Forcibly open Android SDK Manager, and take update to install 1. Android SDK Build Tools revision 17 2. Android SDK platform tools revision 17 3. Android SDK tools revision 17
From all library project dont forget to enable "Android Private Libraries" the check box inside properties-> order and export.
Thanks.
Upvotes: 0
Reputation: 1815
I've also noticed in my own projects, under Java Build Path > Order and Export, I sometimes need to go in and make sure all my linked sources have their boxes checked.
Upvotes: 0
Reputation: 11782
The new ADT makes you call it 'libs' instead of lib. rename your directory and see if that fixes it
Upvotes: 1