Question

My Android application uses AndroidAnnotations and works fine in debug mode but when I try to Export the Signed Application package, the wizard finishes successfully and creates the APK but the app crashes as soon as it starts with a Runtime Exception: Unresolved compilation problems. The activity that is not found is one generated by AndroidAnnotations.

I already tried all the suggested solutions like Project Clean and delete the gen folder and run the Export wizard again, no luck so far.

09-08 18:23:57.744: E/AndroidRuntime(11547): java.lang.Error: Unresolved compilation problems: 
09-08 18:23:57.744: E/AndroidRuntime(11547):    The import     com.oneworld.poller.activity.account.CreateAccountActivity_ cannot be resolved
Était-ce utile?

La solution 2

I figured the only way to solve this reliably was by refactoring the code and change the class references to use the fully qualified name instead of declaring an import.

This makes some lines of code a bit long but has the benefit to also address this other issue mentioned in the Android Annotations FAQ: https://github.com/excilys/androidannotations/wiki/FAQ#wiki-import

Autres conseils

It seems that the generated classes was not bundled in the apk.

Could you check your project configuration in "Java build path" / "Order and Export". The output directory for generated classes (usually apt_generated) should be checked.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top