Android HelloTab Tutorial
I am an experienced Java programmer just starting out with Android development. I am going through the tutorials and am having a problem with the tab widget tutorial. I have followed the example to the letter and keep getting the below in the log when trying to run on the emulator:
ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=开发者_开发问答com.android/.HelloTabWidget }
ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android/.HelloTabWidget } from null (pid=-1, uid=-1) requires null
I have searched the internet forums for the last three hours and can't find any answers to what is going on. The tutorial I am using is here: http://developer.android.com/resources/tutorials/views/hello-tabwidget.html. I am using jre 1.6, and Android platform 2.1. Any help will be appreciated. I can't tell you how frustrating it is when you follow a supposed simple example and you can't get it to work.
If you are still having issues and you have tried all that is mentioned above...
Last try is: Make sure your target SDK and ADT matches the required SDK and ADT version...This will surely help. My project is looking for API 8 and I have API 14. So I have installed API 8 version with ADT8.X version...
Without having done this particular tutorial, I'll say that the main reason for permission denial errors in Android in my limited experience is failure to declare necessary permissions in the AndroidManifest.xml file. I'm not sure that this is the case here though.
This may be a red herring, but the name of your application doesn't look right. It looks like you've named it as if it's an android system application (the package prefix "com.android" I've only seen with regard to Android system apps). Maybe if you tried putting something other than "com.android" for the package field in your project this might help, because it could be that the namespace is protected.
精彩评论