【问题标题】:Can't install apps with Eclipse ADT on my phone无法在我的手机上使用 Eclipse ADT 安装应用程序
【发布时间】:2013-10-09 23:02:30
【问题描述】:

我想使用 Eclipse ADT 安装和调试项目。它找到设备并尝试安装,但随后出现以下错误。 这款手机是“HTC One S”,它是自定义 ROM“代号 Lungo One S”(4.3)。这些应用程序是 Kontalk 项目和来自 17 个(4.2.2)示例的 ApiDemos,它们都是为 4.2.2 构建的。 在模拟器中安装是可行的。

10-10 00:36:30.783: E/AndroidRuntime(2943): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
10-10 00:36:30.783: E/AndroidRuntime(2943): java.lang.SecurityException: Neither user 2000 nor current process has android.permission.INSTALL_PACKAGES.
10-10 00:36:30.783: E/AndroidRuntime(2943):     at android.os.Parcel.readException(Parcel.java:1431)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at android.os.Parcel.readException(Parcel.java:1385)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at android.content.pm.IPackageManager$Stub$Proxy.installPackageWithVerificationAndEncryption(IPackageManager.java:3314)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.commands.pm.Pm.runInstall(Pm.java:931)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.commands.pm.Pm.run(Pm.java:109)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.commands.pm.Pm.main(Pm.java:77)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at dalvik.system.NativeStart.main(Native Method)
10-10 00:36:30.793: E/JavaBinder(2943): Unknown binder error code. 0xfffffff7
10-10 00:36:30.793: E/ServiceManager(2943): error in getService
10-10 00:36:30.793: E/ServiceManager(2943): android.os.RemoteException: Unknown binder error code. 0xfffffff7
10-10 00:36:30.793: E/ServiceManager(2943):     at android.os.BinderProxy.transact(Native Method)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.os.ServiceManagerProxy.getService(ServiceManagerNative.java:123)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.os.ServiceManager.getService(ServiceManager.java:55)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1911)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1909)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.util.Singleton.get(Singleton.java:34)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.app.ActivityManagerNative.getDefault(ActivityManagerNative.java:73)
10-10 00:36:30.793: E/ServiceManager(2943):     at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
10-10 00:36:30.793: E/ServiceManager(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
10-10 00:36:30.793: E/ServiceManager(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-10 00:36:30.793: E/ServiceManager(2943):     at dalvik.system.NativeStart.main(Native Method)
10-10 00:36:30.793: E/AndroidRuntime(2943): Error reporting crash
10-10 00:36:30.793: E/AndroidRuntime(2943): java.lang.NullPointerException
10-10 00:36:30.793: E/AndroidRuntime(2943):     at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
10-10 00:36:30.793: E/AndroidRuntime(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
10-10 00:36:30.793: E/AndroidRuntime(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-10 00:36:30.793: E/AndroidRuntime(2943):     at dalvik.system.NativeStart.main(Native Method)

有什么想法吗?在互联网上找不到任何关于此的内容?

【问题讨论】:

  • 我降级到代号 Lungo CM10 并且它可以工作。我不认为它是一个好的解决方案,因为我想使用最新版本进行调试。所以跟CL、CM或者原来的Android版本有关。我询问了 CL 开发人员,希望他们能提供帮助。

标签: android eclipse adb


【解决方案1】:

你可以试试

<uses-permission android:name="android.permission.INSTALL_PACKAGES" /> 

在 AndroidManifest.xml 中启动应用程序标记之前。

【讨论】:

  • 我会在哪里添加这个?我试图在应用程序清单中这样做,但据说它只允许用于系统应用程序。
【解决方案2】:

我认为您正在寻找 this,但您可以先尝试 cleanbuild 您的项目。

【讨论】:

  • 顺便说一句:android.permission.INSTALL_PACKAGES Not for use by third-party applications.Android Reference
  • 这似乎没有帮助。错误消息会变成警告(或更低,具体取决于指定的级别),但项目会像以前一样构建和运行。
  • 我认为问题与您的设备有关。你以前用它调试过吗?你为什么不试试this
  • 谢谢,我也试过了,但似乎不起作用。请参阅对我的问题的评论以获取更新。仅当您无法通过调试器访问电话时,才需要最后一个链接。我不是这种情况,它已列出,我可以触发安装,但它失败了。
【解决方案3】:

问题是带有 CM10.1 和 CM10.2 的 Codename Lungo。这是一个错误,或者至少您无法使用标准程序调试应用程序。它可以在我的手机上使用 CL CM10 和 CynogenMod 10.2。

Tim Veluwenkamp 昨天宣布了一个新版本的 CL,它可能会解决这个问题,但我不确定。我现在在 CM10.2 上。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多