Two Activity in One Project

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Two Activity in One Project

Postby rajeshcit » Thu Nov 26, 2009 8:14 am

hai

am created one project and project contains two activity class,two activity's are independent.
First activity name is suppose "Test",second is "Hello", and added these twos entries in manifest file.
when i run this project first one is working ,second is not working its giving error like this

11-26 12:35:53.760: WARN/dalvikvm(745): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
11-26 12:35:53.781: ERROR/AndroidRuntime(745): Uncaught handler: thread main exiting due to uncaught exception
11-26 12:35:53.790: ERROR/AndroidRuntime(745): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test/com.test.TestContentProvider}: java.lang.IllegalArgumentException: Unknown URL com.test
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.os.Handler.dispatchMessage(Handler.java:99)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.os.Looper.loop(Looper.java:123)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.app.ActivityThread.main(ActivityThread.java:3948)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at java.lang.reflect.Method.invokeNative(Native Method)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at java.lang.reflect.Method.invoke(Method.java:521)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at dalvik.system.NativeStart.main(Native Method)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): Caused by: java.lang.IllegalArgumentException: Unknown URL com.test
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.content.ContentResolver.insert(ContentResolver.java:473)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at com.test.TestContentProvider.insertRecords(TestContentProvider.java:20)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at com.test.TestContentProvider.onCreate(TestContentProvider.java:13)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
11-26 12:35:53.790: ERROR/AndroidRuntime(745): ... 11 more


please help me.can i run two activity in one project

thanks
reagrds
rajesh
rajeshcit
Junior Developer
Junior Developer
 
Posts: 11
Joined: Wed Nov 18, 2009 9:38 am

Top

Re: Two Activity in One Project

Postby briandanielsen » Thu Nov 26, 2009 3:32 pm

rajeshcit wrote:11-26 12:35:53.760: WARN/dalvikvm(745): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
11-26 12:35:53.781: ERROR/AndroidRuntime(745): Uncaught handler: thread main exiting due to uncaught exception
11-26 12:35:53.790: ERROR/AndroidRuntime(745): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test/com.test.TestContentProvider}: java.lang.IllegalArgumentException: Unknown URL com.test


I can see from the information that you have an uncaught exception in your code, sadly it is hard to know where it is when you are not posting the code that caused it.

What I can tell you is that it might have something to do with an illegal argument.

Good luck with finding the bug.
briandanielsen
Freshman
Freshman
 
Posts: 5
Joined: Sun Nov 22, 2009 5:14 pm

Postby nithin.warier » Fri Nov 27, 2009 7:42 am

Hi Rajesh,

11-26 12:35:53.790: ERROR/AndroidRuntime(745): at com.test.TestContentProvider.insertRecords(TestContentProvider.java:20)

from this , the error is in the file "TestContentProvider.java" and in the line nunmber 20. Check that and find out

Happy debugging..

Thanks
smartandroidians.blogspot.com
nithin.warier
Experienced Developer
Experienced Developer
 
Posts: 87
Joined: Thu Feb 28, 2008 12:05 pm
Location: Malappuram Kerala India

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests