scala-android-libs/scala-android-libs — Issue #8: Error thrown when trying to use the shared scala android libs
Author: MINDoSOFT
Created: 2012-02-20 21:37:23+00:00
State: open

I have an app which uses the https://github.com/rst/positronic_net library which is written in scala.

The app works before I make useProguard = false and add the uses-library statements in the AndroidManifest.xml.

When I try to use the shared scala android libs which I have installed using your application on my
rooted android phone I get the following error.

02-20 23:32:30.781: WARN/dalvikvm(1464): Exception Ljava/lang/IllegalAccessError; thrown while initializing Lorg/positronicnet/ui/ResourceId$;
02-20 23:32:30.801: ERROR/AndroidRuntime(1464): FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at org.positronicnet.ui.PositronicActivityHelpers$class.$init$(PositronicActivityHelpers.scala:37)
at mindosoft.scala.easynotes.NotesActivity.(NotesActivity.scala:29)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1409)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1672)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
at android.app.ActivityThread.access$1500(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at org.positronicnet.ui.ResourceId$.(ResourceId.scala:8)
at org.positronicnet.ui.ResourceId$.(ResourceId.scala)
... 17 more

Any help is greatly appreciated.

Thanks for your awesome project.