2012-07-18 93 views
18

我在Eclipse(Mac OS X)中有一个简单的应用程序HelloWorld Android应用程序,当我安装到模拟器/ AVD时,应用程序显示在“Settings - > [Devices] Apps “但不在发射器中。我注意到在logcat,我得到这些错误Android“没有找到权限吊销的内容提供商”

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目录的读/写/执行权限。

+2

请参阅http://stackoverflow.com/a/9532683/165674 http://stackoverflow.com/a/8646393/165674 http://stackoverflow.com/q/11073358/165674 – 2012-07-25 18:35:39

+0

谢谢,但我已经阅读并尝试了该线程的建议 – 2012-07-25 20:16:51

+0

@Sean ThreadS,您提到了'.android'和'/ data/local'目录权限,那么[删除'dalvik-cache'](http://stackoverflow.com/questions/9532653/Android的4-0-3仿真器安装,失败与 - 许可的撤销/ 9532683#9532683)? [试用这个应用程序](http://stackoverflow.com/questions/11073358/android-error-message-on-install-no-content-provider-found#comment14494371_11073358)? [尝试其他设备](http://stackoverflow.com/a/11074769/85950)?这些都给出了同样的错误? – blahdiblah 2012-07-28 00:03:44

回答

6

在我来说,我忘了定义主要活动。所以,我在AndroidManifest.xml中添加了以下代码活动。

<intent-filter> 
    <action android:name="android.intent.action.MAIN"/> 
    <category android:name="android.intent.category.LAUNCHER"/> 
</intent-filter> 

这对活动定义结果:

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

我认为问题出在安装目录权限。 /data/local需要写入并执行其他人的权利才能正确安装adb软件包。

Source

试试这个,太:Android - Download App

1

我刚刚找到解决的Linux,但我没有找到适用于Windows,也许是因为在Windows目录和权限感到困惑。

这对我有用:在完全控制的文件夹“C://YourUser//.Android//”中添加用户“Everyone”,然后重新启动emulador。

+0

我刚刚更改了“avd”子文件夹的权限和所有权,并且像魅力一样工作。 – 2017-08-23 09:08:56

0

我的解决办法是删除了android:sharedUserId-标签在AndroidManifest.xml ...

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my.app"
android:theme="@style/MyAppTheme"
android:versionCode="9"
android:versionName="1.2.5" android:sharedUserId="mc">

0

在科尔多瓦和仿真工作,

对我来说,问题是,APK尺寸较大且AVD RAM太小,

安装新版本的apk时发生问题,并且由于消息“未找到允许撤销的内容提供者”而失败

那些固定的问题,我的任何一个:

  • 卸载旧的APK手动之前安装新版本
  • 减少APK大小
  • 增加设备RAM
1

我的所有设备上都有同样的问题。我的问题是从运行配置,我没有检查“启动默认活动”。

0

这对我的作品

检查清单的应用程序,如果有这样一行 tools:replace="android:icon"

<application android:name=".activities.MyApplication" android:allowBackup="true" android:icon="@drawable/launcher_icon" android:label="@string/app_name" android:largeHeap="true" tools:replace="android:icon">

使它像这样通过删除此行 tools:replace="android:icon"

<application android:name=".activities.MyApplication" android:allowBackup="true" android:icon="@drawable/launcher_icon" android:label="@string/app_name" android:largeHeap="true" >

1

我遇到了这个问题,建立一个新的签名APK。

我检查了V2(Full APK签名)。在设备上安装APK不起作用。

我的解决方案是检查V1(Jar签名)。这确实奏效。

+0

这并没有真正回答这个问题。在这种情况下,“检查”意味着什么?你在“检查”的签名在哪里?解决方案“工作”意味着什么? – Elliot 2017-03-10 12:01:53

+0

我想他是在谈论android工作室 - >生成签名的apk - >用V1选项签字 – yerlilbilgin 2017-06-03 16:34:00

+0

这完全解决了我的问题。谢谢 – yerlilbilgin 2017-06-03 16:43:49