I don't try to communicate between Project1 and Project2 or to send
data from Project2 to Project1.
I just want to use a class from Project1 in Project2.
Before I update to 1.5 it worked.

Rakoun
/°\

On 11 mai, 03:08, Raphael <r...@android.com> wrote:
> Different applications run in distinct VMs. You can't just access data 
> directly.
>
> The Android way of sharing data between activities is to send an Intent.
>
> R/
>
> On Sun, May 10, 2009 at 7:23 PM, Rakoun <regis.geromegn...@gmail.com> wrote:
>
> > Bonsoir tout le monde,
>
> > I investigated more and I notice that.
> > If I create a project, named "Project1" with one Activiy and with a
> > class name A that have a Uri pulic static field and if I create
> > another project named "Project2" that reference "Project1", if in
> > "Project2" I try to assign A.myuri to an Uri variable, Project2 failed
> > at running.
> > Why?
>
> > -------------------- Project1 ---------------------
> > public class A {
> >  public static Uri myuri = Uri.parse("test");
> > }
>
> > package com.project1;
>
> > public class Project1 extends Activity {
> >    /** Called when the activity is first created. */
> >   �...@override
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
> >    }
> > }
>
> > ------------------- Project2 --------------------------------------
> > package com.project2;
>
> > import com.project1.A;
>
> > public class TestDuplicatedField extends Activity {
> >    /** Called when the activity is first created. */
> >   �...@override
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
> >        Uri uri = A.myuri;
> >    }
> > }
>
> > Regards
>
> > On 8 mai, 22:29, 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:unabletoresolvestatic
> >> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to