0

Ok, first of all, I know, that many users asked this question many times in stackoverflow. I looked through all possible solutions, but still have problem.

The problem:

My IDE: Eclipse Standard/SDK

Version: Kepler Release Build id: 20130614-0229

I have an android library project, called mb-fw-android. In this project properties -> android -> Is Library - checked;

I have another project called mb-revise-android, an it needs to use mb-fw-android. I'v tried :

1) Go to mb-revise-android -> properties -> Android -> add android library -> start projec

Result is:

02-26 12:04:19.960: E/dalvikvm(11678): Could not find class 'ru.tsi.maksbm.android.config.AndroidFilePropsIOProvider', referenced from method ru.tsi.maksbm.android.revise.model.Model.<init>
02-26 12:04:19.976: E/AndroidRuntime(11678): FATAL EXCEPTION: main
02-26 12:04:19.976: E/AndroidRuntime(11678): java.lang.NoClassDefFoundError: ru.tsi.maksbm.android.config.AndroidFilePropsIOProvider
02-26 12:04:19.976: E/AndroidRuntime(11678):    at ru.tsi.maksbm.android.revise.model.Model.<init>(Model.java:117)
02-26 12:04:19.976: E/AndroidRuntime(11678):    at ru.tsi.maksbm.android.revise.model.Model.createInstance(Model.java:64)
02-26 12:04:19.976: E/AndroidRuntime(11678):    at ru.tsi.maksbm.android.revise.ReviseStartActivity.onCreate(ReviseStartActivity.java:70)
...

2) add android library project as a classic depencency project. mb-revise-android -> properties -> buildPath -> project -> add, then order and export -> check mb-fw-android project

Still the same error

3) Uncheck mb-fw-android IsLibrary checkbox, and try (2). The same result

4) Uncheck mb-fw-android IsLibrary checkbox, execute it like .apk, go to /bin folder and find mb-fw-android.jar. Paste this .jar to mb-revise-android "libs" folder, and mark "order and export" Android Private Libraries as checked.

The same result.

Summary: i've tried to add android library project as .jar, as classic dependency project and as properties -> android -> add android library, mark order and export as checked, when possible, but still not working.

Please help me, if you know solution. I use Android SDK Platform-tools 19.0.1 and Android SDK Build-tools 19.0.2

Thank you.

Wow, I just find soluiton.

We can see there http://developer.android.com/tools/sdk/eclipse-adt.html#notes one interestiong thing about ADT 20.0.0 and higher:

Build System

Added automatic merging of library project manifest files into the including project's manifest. Enable this feature with the manifestmerger.enabled property.

I've tried to add "manifestmerger.enabled=true" to my project.properties file and all is done. The thing is that builder doesn't merge my library project manifest with apk project manifest

1 Answers1

1

try importing the library project to the work space. Go to your project rightclick->properties->Android scroll down. In library add you library project

Preethi Rao
  • 5,117
  • 1
  • 16
  • 29
  • From post 1) Go to mb-revise-android -> properties -> Android -> add android library -> start project Not working – user1059786 Feb 26 '14 at 08:41
  • After adding this you cleaned your project and rebuilt it right? – Preethi Rao Feb 26 '14 at 08:43
  • There should not multiple copies of the same library file.. If you importing library above mentioned way then remove the jar file from 1)build path 2) lib folder if it exists over there. Cause if the multiple copies exists you will get this kind of error – Preethi Rao Feb 26 '14 at 08:51
  • I know, that if i will try to multiple define one class dalvik can throw "multiple class define error". But when i add jar - i remove android library dependency, and when a try to add android library project dependency i remove .jar – user1059786 Feb 26 '14 at 08:54