Hello, SDK 1.5 changed the way that 'Java Build Path/Projects' works in the eclipse ADT plugin. (see http://osdir.com/ml/AndroidDevelopers/2009-05/msg00192.html).
Previously in eclipse, marking a project to depend on another lead to the compiled .class files from the dependency to be included in your classes.dex and .apk file. This is no longer the case. We encountered the same problem while trying to create a 'content provider'. If you follow the Android guidelines (http://developer.android.com/guide/ topics/providers/content-providers.html) and create a static CONTENT_URI as recommended you will compile in eclipse (if you are using dependent projects) but break at runtime, as the class verifier on the device (or emulator) will not have access to the content provider class. The 'solution' that we used was to not refer to the content providers 'CONTENT_URI' and simply inlined the URI into the code that made the content resolver calls. Regards, Dan. On May 9, 3:29 am, Rakoun <regis.geromegn...@gmail.com> wrote: > I have to project in my eclipse IDE: > - my android application, where I defined a content provider, > - a junit project base on a article from "My life with android" blog > (http://tinyurl.com/q7v3o5) where I test my content provider. > Before I update to 1.5 the junit project work well for my test case. > Since I passed to 1.5 sdk the junit test case failed for my test case > but work for all test case define in the article of "My life with > android" (http://tinyurl.com/q7v3o5). > I compile my junit project in 1.1 and try to test it on a 1.1 avd and > 1.5 avd but it still not works. > Can anybody help me? > > Here is the error I get: > ----------------------------------------------------------------------------------------------------------------------------------------------------- > 05-09 02:02:43.733: WARN/dalvikvm(1318): VFY: unable to resolve static > field 50 (CONTENT_URI) in Lcom/rakoun/boutsdechandelles/ > contentprovider/BDCProviderShop$Shops; > 05-09 02:02:43.733: WARN/dalvikvm(1318): VFY: rejecting opcode 0x62 > at 0x0009 > 05-09 02:02:43.733: WARN/dalvikvm(1318): VFY: rejected Laexp/junit/ > BoutsDeChandellesProviderTest;.testDeleteShop ()V > 05-09 02:02:43.743: WARN/dalvikvm(1318): Verifier rejected class Laexp/ > junit/BoutsDeChandellesProviderTest; > 05-09 02:02:57.724: WARN/dalvikvm(1318): threadid=17: thread exiting > with uncaught exception (group=0x4000fe70) > 05-09 02:02:57.724: ERROR/AndroidRuntime(1318): Uncaught handler: > thread Thread-9 exiting due to uncaught exception > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): java.lang.VerifyError: > aexp.junit.BoutsDeChandellesProviderTest > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > java.lang.Class.getDeclaredConstructors(Native Method) > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > java.lang.Class.getConstructor(Class.java:484) > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > junit.framework.TestSuite.getTestConstructor(TestSuite.java:177) > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > junit.framework.TestSuite.<init>(TestSuite.java:59) > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > junit.framework.TestSuite.addTestSuite(TestSuite.java:101) > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > aexp.junit.ExampleSuite.<init>(ExampleSuite.java:9) > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > aexp.junit.TestRunner.run(JUnit.java:144) > 05-09 02:02:57.884: ERROR/AndroidRuntime(1318): at > java.lang.Thread.run(Thread.java:1058) > ----------------------------------------------------------------------------------------------------------------------------------------------------- > > Rakoun > /°\ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---