[android-developers] Re: Service permission and AndroidManifest.xml errors

2009-02-10 Thread Ludwig
This seems to be the trigger for your problems:
java.lang.RuntimeException: Your content must have a ListView whose id
attribute is 'android.R.id.list'

you are somehow trying to launch some activity that has has misconfigured UI
content. I would put breakpoints into my onCreate() methods to see what is
actually getting called. I do not think at this point any IPC has started.

In my experience it is a good idea to make sure that a service can be
launched inside a process first before trying to launch it remotely. It
eliminates a lot of confusion.

HTH
Ludwig

2009/2/10 Android 

>
> Hi,
>
> I have created two .apk as client and server. My client Acticity wants
> to invoke the Service of my Server .apk. I used the AIDL and IPC
> mechanism to communicate betwwen the Client and server.
>
> My Client code was compiled fine but during Server compliation it was
> giving bunch of errors as :
> 02-10 17:40:22.310: WARN/dalvikvm(246): threadid=3: thread exiting
> with uncaught exception (group=0x40010e28)
> 02-10 17:40:22.310: ERROR/AndroidRuntime(246): Uncaught handler:
> thread main exiting due to uncaught exception
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):
> java.lang.RuntimeException: Unable to start activity ComponentInfo
> {oem.android.proj2/oem.android.proj2.RemoteServiceBinding}:
> java.lang.RuntimeException: Your content must have a ListView whose id
> attribute is 'android.R.id.list'
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2140)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2156)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.ActivityThread.access$1800(ActivityThread.java:112)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.os.Handler.dispatchMessage(Handler.java:88)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.os.Looper.loop(Looper.java:123)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.ActivityThread.main(ActivityThread.java:3742)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> java.lang.reflect.Method.invoke(Method.java:515)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:739)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> dalvik.system.NativeStart.main(Native Method)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): Caused by:
> java.lang.RuntimeException: Your content must have a ListView whose id
> attribute is 'android.R.id.list'
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.ListActivity.onContentChanged(ListActivity.java:236)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> com.android.internal.policy.impl.PhoneWindow.setContentView
> (PhoneWindow.java:230)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.Activity.setContentView(Activity.java:1569)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> oem.android.proj2.RemoteServiceBinding.onCreate
> (RemoteServiceBinding.java:35)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1122)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2103)
>
>
> =
>
> My AndroidManifest.xml file are as below:
>
> Server Manifest file:
>
>   android:label="@string/app_name"
>  android:exported="true"
>  android:enabled="true"
>
> android:permission="oem.android.permission.READ_OWNER_DATA">
> 
>
>
>
>
> Client Manifest file:
> 
>
>  android:label="@string/app_name">
>
>
> android:name="android.intent.category.LAUNCHER" />
>
>
>
>
>
> Can some plz help me to resolve the errors.
>
> To communicate between two normal .apks what permission should be
> prefered, for time being i am using
> android.permission.READ_OWNER_DATA,  is that ok.
>
> -Kumar
> >
>

--~--~-~--~~~---~--~~
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
-~--

[android-developers] Re: Service permission and AndroidManifest.xml errors

2009-02-11 Thread Ulrich Scheller

I was having the same error message and didnt know what to do about it
at first. The mistake was that I was extending the ListActivity, not
just an Activity.



On Feb 10, 2:04 pm, Android  wrote:
> Hi,
>
> Ihavecreated two .apk as client and server. My client Acticity wants
> to invoke the Service of my Server .apk. I used the AIDL and IPC
> mechanism to communicate betwwen the Client and server.
>
> My Client code was compiled fine but during Server compliation it was
> giving bunch of errors as :
> 02-10 17:40:22.310: WARN/dalvikvm(246): threadid=3: thread exiting
> with uncaught exception (group=0x40010e28)
> 02-10 17:40:22.310: ERROR/AndroidRuntime(246): Uncaught handler:
> thread main exiting due to uncaught exception
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):
> java.lang.RuntimeException: Unable to start activity ComponentInfo
> {oem.android.proj2/oem.android.proj2.RemoteServiceBinding}:
> java.lang.RuntimeException:YourcontentmusthaveaListViewwhoseidattributeis 
> 'android.R.id.list'
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2140)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
> 2156)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.ActivityThread.access$1800(ActivityThread.java:112)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.os.Handler.dispatchMessage(Handler.java:88)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.os.Looper.loop(Looper.java:123)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.ActivityThread.main(ActivityThread.java:3742)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> java.lang.reflect.Method.invoke(Method.java:515)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:739)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> dalvik.system.NativeStart.main(Native Method)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246): Caused by:
> java.lang.RuntimeException:YourcontentmusthaveaListViewwhoseidattributeis 
> 'android.R.id.list'
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.ListActivity.onContentChanged(ListActivity.java:236)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> com.android.internal.policy.impl.PhoneWindow.setContentView
> (PhoneWindow.java:230)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.Activity.setContentView(Activity.java:1569)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> oem.android.proj2.RemoteServiceBinding.onCreate
> (RemoteServiceBinding.java:35)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
> 1122)
> 02-10 17:40:22.330: ERROR/AndroidRuntime(246):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2103)
>
> =
>
> My AndroidManifest.xml file are as below:
>
> Server Manifest file:
>
>                    android:label="@string/app_name"
>                   android:exported="true"
>                   android:enabled="true"
>
> android:permission="oem.android.permission.READ_OWNER_DATA">
> 
>     
>
> Client Manifest file:
> 
>     
>                            android:label="@string/app_name">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
>     
>
> Can some plz help me to resolve the errors.
>
> To communicate between two normal .apks what permission should be
> prefered, for time being i am using
> android.permission.READ_OWNER_DATA,  is that ok.
>
> -Kumar
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---