安装期间Android APK错误

时间:2017-01-11 19:27:20

标签: android xamarin

使用存档管理器将解决方案发布到APK时,未安装APK。

当我使用ES文件资源管理器点击设备上的APK时,会显示一条消息:“应用未安装”

以下是我使用的版本:

  

Microsoft Visual Studio Premium 2012版本11.0.50727.1 RTMREL   Microsoft .NET Framework版本4.6.01055

     

已安装版本:Premium

     

Visual C#2012 04941-004-0043007-02064 Microsoft Visual C#2012

     

Xamarin 4.2.2.6(27a9b40)启用Visual Studio扩展   开发Xamarin.iOS和Xamarin.Android。

     

Xamarin.Android 7.0.2.42(501e63c)启用Visual Studio扩展   开发Xamarin.Android。

     

Xamarin.iOS 10.3.1.7(8b53676)启用Visual Studio扩展   Xamarin.iOS的开发。

有没有人可以确切地了解为什么没有安装该应用程序?

当我使用设备记录时,我看到以下输出

01-11 15:35:10.734 I/InstallAppProgress(18156): Finished installing com.afs.dsd_mobile
01-11 15:35:12.070 I/ActivityManager(  454): START u0 {dat=/storage/emulated/0/Download/com.afs.dsd_mobile.apk cmp=com.estrongs.android.pop/.app.ShowDialogActivity (has extras)} from pid 17445
01-11 15:35:12.508 I/ActivityManager(  454): Displayed com.estrongs.android.pop/.app.ShowDialogActivity: +362ms
01-11 15:35:13.367 I/ActivityManager(  454): START u0 {cmp=com.estrongs.android.pop/.app.OpenRecomm (has extras)} from pid 17445
01-11 15:35:13.484 W/ResourceType(17445): No package identifier when getting value for resource number 0x00000000
01-11 15:35:13.523 I/ActivityManager(  454): START u0 {act=android.intent.action.VIEW dat=file:///storage/emulated/0/Download/com.afs.dsd_mobile.apk typ=application/vnd.android.package-archive cmp=com.android.packageinstaller/.PackageInstallerActivity} from pid 17445
01-11 15:35:13.625 I/AppSecurityPermissions(18156): Ignoring unknown permission:com.symbol.emdk.permission.EMDK
01-11 15:35:13.625 I/AppSecurityPermissions(18156): Ignoring unknown permission:com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY
01-11 15:35:13.625 I/AppSecurityPermissions(18156): Ignoring unknown permission:android.permission.USE_FINGERPRINT
01-11 15:35:13.625 W/AppSecurityPermissions(18156): Could'nt retrieve shared user id for:com.afs.dsd_mobile
01-11 15:35:13.750 I/ActivityManager(  454): Displayed com.android.packageinstaller/.PackageInstallerActivity: +221ms (total +364ms)
01-11 15:35:15.195 I/ActivityManager(  454): START u0 {dat=file:///storage/emulated/0/Download/com.afs.dsd_mobile.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras)} from pid 18156
01-11 15:35:15.320 D/dalvikvm(18156): GC_CONCURRENT freed 96K, 3% free 6960K/7120K, paused 13ms+11ms, total 56ms
01-11 15:35:15.328 D/dalvikvm(18156): WAIT_FOR_CONCURRENT_GC blocked 3ms
01-11 15:35:15.375 W/ActivityManager(  454): No content provider found for permission revoke: file:///storage/emulated/0/Download/com.afs.dsd_mobile.apk
01-11 15:35:15.445 I/ActivityManager(  454): Displayed com.android.packageinstaller/.InstallAppProgress: +205ms
01-11 15:35:25.914 W/ActivityManager(  454): No content provider found for permission revoke: file:///storage/emulated/0/Download/com.afs.dsd_mobile.apk
01-11 15:35:25.914 I/PackageManager(  454): Copying native libraries to /data/app-lib/vmdl-1977729985
01-11 15:35:28.109 W/PackageParser(  454): Exception reading /data/app/vmdl-1977729985.tmp
01-11 15:35:28.109 W/PackageParser(  454): java.lang.NullPointerException
01-11 15:35:28.109 W/PackageParser(  454):  at android.content.pm.PackageParser.collectCertificates(PackageParser.java:633)
01-11 15:35:28.109 W/PackageParser(  454):  at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:7886)
01-11 15:35:28.109 W/PackageParser(  454):  at com.android.server.pm.PackageManagerService.access$1900(PackageManagerService.java:172)
01-11 15:35:28.109 W/PackageParser(  454):  at com.android.server.pm.PackageManagerService$5.run(PackageManagerService.java:6018)
01-11 15:35:28.109 W/PackageParser(  454):  at android.os.Handler.handleCallback(Handler.java:725)
01-11 15:35:28.109 W/PackageParser(  454):  at android.os.Handler.dispatchMessage(Handler.java:92)
01-11 15:35:28.109 W/PackageParser(  454):  at android.os.Looper.loop(Looper.java:137)
01-11 15:35:28.109 W/PackageParser(  454):  at android.os.HandlerThread.run(HandlerThread.java:60)
01-11 15:35:28.406 D/dalvikvm(  454): GC_EXPLICIT freed 1663K, 34% free 16718K/25044K, paused 10ms+12ms, total 171ms
01-11 15:35:28.414 D/InstallAppProgress(18156): Installation error code: -102

3 个答案:

答案 0 :(得分:1)

问题在于我忽略了使用分发功能对APK进行签名。一旦我能够使用我的密钥签名,APK就会成功安装。

答案 1 :(得分:0)

请看这个网站,它可以解决你的问题。

http://mobilityarena.com/fix-application-not-installed-error-androids/

有时候是一个重复的包名称应用程序,或者是另一个应用程序中的重复的FacebookContentProvider声明。

问候!

答案 2 :(得分:0)

为其他人澄清......

您必须做三件事来构建APK并在设备上运行它。

  1. 构建为发布(而非调试)
  2. 归档然后通过右键单击项目,选择存档,然后选择分发来签署apk。
  3. 将设备置于开发者模式,然后下载apk并运行它。