1

我已经开发了一个应用程序,我可以从 Android Studio 安装它,但是在创建签名的 APK 文件后,我得到了这个结果并且无法安装该应用程序。我得到这个日志:

12-31 21:13:36.118 3965-3965/? W/Finsky: [1] aaam.a(12): Exception reading file:///storage/emulated/0/Download/app-release.apk in request id=4 java.lang.NullPointerException: Attempt to read from field 'android.content.pm.ApplicationInfo android.content.pm.PackageInfo.applicationInfo' on a null object reference
12-31 21:13:36.119 3965-3965/? E/Finsky: [1] aaev.b(2): Package name null is not an installed package
12-31 21:13:36.120 3965-3965/? W/Finsky: [1] aaam.f(34): The installer's package name is missing
12-31 21:13:36.124 3965-4061/? I/Finsky: [276] zta.a(9): Single user settings service is not running, bind it now
12-31 21:13:36.127 3965-3965/? I/Finsky: [1] zsz.onServiceConnected(1): Single user settings service is connected
12-31 21:13:36.133 3965-4061/? W/Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
12-31 21:13:36.188 3965-4061/? W/Finsky: [276] aaam.a(12): Exception reading file:///storage/emulated/0/Download/app-release.apk in request id=4 java.lang.NullPointerException: Attempt to read from field 'android.content.pm.ApplicationInfo android.content.pm.PackageInfo.applicationInfo' on a null object reference
12-31 21:13:36.188 3965-4061/? I/Finsky: [276] zzm.a(21): Verify: Cannot read archive for file:///storage/emulated/0/Download/app-release.apk in request id=4, package=my.application.package.name
12-31 21:13:36.192 3965-4061/? I/Finsky: [276] aael.d(2): Assuming split not required due to null packageInfo for id=4
12-31 21:13:36.193 3965-4061/? I/Finsky: [276] aaev.b(4): PSIC verification started with installer uid: 10015 package name: com.google.android.packageinstaller, originating uid: 10111
12-31 21:13:36.197 3965-4061/? I/Finsky: [276] aaev.b(22): Skipping logging for attempted installation. The GPP Installer warnings experiment for O+ is disabled.
12-31 21:13:36.197 3965-4061/? W/Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
12-31 21:13:36.202 3965-4061/? I/Finsky: [276] aaev.b(46): Skipping validation for user's trust on the source. The source has already been user trusted.
12-31 21:13:36.203 3965-3965/? I/Finsky: [1] aaam.c(5): Verifying id=4, result=1
12-31 21:13:36.204 3965-3965/? I/Finsky: [1] aaam.ha(6): Verification complete: id=4, package_name=my.application.package.name
12-31 21:13:36.215 12018-12029/? D/DefContainer: Copying /storage/emulated/0/Download/app-release.apk to base.apk
12-31 21:13:36.266 195-195/? W/SurfaceFlinger: couldn't log to binary event log: overflow.
12-31 21:13:36.580 777-804/? W/PackageManager: Failed collect during installPackageLI
    android.content.pm.PackageParser$PackageParserException: Package /data/app/vmdl1498994174.tmp/base.apk has no certificates at entry AndroidManifest.xml
        at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1105)
        at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1058)
        at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:12508)
        at com.android.server.pm.PackageManagerService.-wrap25(PackageManagerService.java)
        at com.android.server.pm.PackageManagerService$9.run(PackageManagerService.java:10410)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:148)
        at android.os.HandlerThread.run(HandlerThread.java:61)

我之前(5 个月前)创建了 APK 文件,没问题!

4

0 回答 0