我在 Eclipse (Mac OS X) 中有一个简单的应用程序 HelloWorld Android 应用程序,当我安装到模拟器/AVD 时,该应用程序显示在设置-> [设备] 应用程序"中,但不在启动器中.我在 logcat 中注意到我收到这些错误
I have a simple app HelloWorld Android app in Eclipse (Mac OS X), when I install to the emulator/AVD the app shows up in "Settings->[Devices] Apps" but not in the launcher. I notice in logcat that I get these errors
W/ActivityManager( 160): No content provider found for permission revoke: file:///data/local/tmp/HelloWorld.apk
W/ActivityManager( 160): No content provider found for permission revoke: file:///data/local/tmp/HelloWorld.apk
I/PackageManager( 160): Running dexopt on: com.example.helloworld
D/dalvikvm( 870): DexOpt: load 124ms, verify+opt 459ms, 720236 bytes
I/ActivityManager( 160): Force stopping package com.example.helloworld uid=10044
我已经在 .android 目录上设置了读/写/执行权限.
I have set read/write/execute permissions on the .android directory.
在我的例子中,我忘了定义 main 活动.因此,我在 AndroidManifest.xml main 活动中添加了以下代码.
In my case I forgot to define main activity. So, I add the following code inside AndroidManifest.xml main activity.
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
这是 Activity 定义的结果:
That was the result for Activity definition:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name="RssfeedActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="DetailActivity"></activity>
</application>
这篇关于Android“未找到可撤销权限的内容提供者"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!