I'm not sure what that exact error message means, but my guess is the
problem has to do with your test to project mapping. An
instrumentation (which is what your test project uses to access
classes in your project under test), can only be targeted to one
android application. Try splitting up your test project into
ProjectATest and ProjectBTest, and see if that helps.

Regards,
Brett.

On Wed, Oct 7, 2009 at 10:42 PM, takashi <t.hag...@gmail.com> wrote:
>
> My application is seperated into three projects in eclipse.
> The first one is a client Android Project called "Project A".
> The second is a server Android Project called "ProjectB".
> Lastly, I have "ProjectATest" for testing that has references
> dependencies to "ProjectA" and "ProjectB".
>
> When excuting InstrumentationTestRunner in "ProjectATest," I get the
> following error message:
>
> [2009-10-08 13:11:47 - ProjectATest]Launching instrumentation
> android.test.InstrumentationTestRunner on device emulator-5554
> [2009-10-08 13:12:01 - ProjectATest]Test run failed: cross-loader
> access from pre-verified class
>
> This is the error as pulled from LogCat:
>
> 10-08 04:11:44.089: ERROR/AndroidRuntime(760): Uncaught handler:
> thread main exiting due to uncaught exception
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):
> java.lang.IllegalAccessError: cross-loader access from pre-verified
> class
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> org.gynoid.db.ClassMetadata.initRelation(ClassMetadata.java:181)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> org.gynoid.GynApplication.onCreate(GynApplication.java:41)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> android.app.Instrumentation.callApplicationOnCreate
> (Instrumentation.java:1045)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> android.app.ActivityThread.handleBindApplication(ActivityThread.java:
> 3622)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> android.app.ActivityThread.access$2500(ActivityThread.java:112)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1729)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> android.os.Looper.loop(Looper.java:123)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> android.app.ActivityThread.main(ActivityThread.java:3948)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:782)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> 10-08 04:11:44.110: ERROR/AndroidRuntime(760):     at
> dalvik.system.NativeStart.main(Native Method)
>
> Has anyone been able to accomplish this or have any suggestions as to
> what I am doing wrong?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to