gpt4 book ai didi

java - Android APK 无法安装在设备上

转载 作者:行者123 更新时间:2023-12-02 06:55:28 24 4
gpt4 key购买 nike

//无法在我的手机上安装 apk,当我从 adb 推送应用程序时,它会抛出以下错误

D/PackageParser( 1336): Scanning package: /system/app/Contacts.apk
I/PackageManager( 1336): /system/app/Contacts.apk changed; collecting certs
D/PackageManager( 1336): Scanning package com.android.contacts
D/PackageManager( 1336): Shared UserID android.uid.shared (uid=10002): packages= [PackageSetting{405f1ad8 com.android.providers.applications/10002}, PackageSetting{405f1890 com.android.providers.contacts/10002}, PackageSetting{405efa20 com.android.contacts/10002}, PackageSetting{405f0ae0 com.android.providers.userdictionary/10002}]
I/dalvikvm( 1336): Zip is good, but no classes.dex inside, and no .odex file in the same directory
W/PackageManager( 1336): IOException reading apk: /system/app/Contacts.apk
W/PackageManager( 1336): java.io.IOException: /system/app/Contacts.apk
W/PackageManager( 1336): at dalvik.system.DexFile.isDexOptNeeded(Native Method)
W/PackageManager( 1336): at com.android.server.PackageManagerService.performDexOptLI(PackageManagerService.java:2880)
W/PackageManager( 1336): at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:3424)
W/PackageManager( 1336): at com.android.server.PackageManagerService.scanPackageLI(PackageManagerService.java:2809)
W/PackageManager( 1336): at com.android.server.PackageManagerService.access$2100(PackageManagerService.java:143)
W/PackageManager( 1336): at com.android.server.PackageManagerService$AppDirObserver.onEvent(PackageManagerService.java:4693)
W/PackageManager( 1336): at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:125)
W/PackageManager( 1336): at android.os.FileObserver$ObserverThread.observe(Native Method)
W/PackageManager( 1336): at android.os.FileObserver$ObserverThread.run(FileObserver.java:88)

我正在使用 mmm/root/android/system/packages/apps/Contacts/进行编译

我的疑问是,当我最近重新启动计算机时,已安装应用程序的输出目录从旧路径:/root/android/system/out/target/product/vision/system/app到新路径:/root/android/system/out/target/product/generic/system/app

我的所有其他应用程序都存在于旧路径中,当我从旧路径安装contacts.apk时,它会正确安装,并且在我重新启动计算机后,当我尝试从构建它的新路径安装时,它会给出我出现以下错误。我不明白这可能是什么环境问题?任何人都可以建议我可以做什么吗?

adb Push Contacts.apk/system/app/Contacts.apk

最佳答案

你在 build 之前忘记吃午饭了。这就是为什么它构建在 out/target/product/generic 而不是 out/target/product/vision 中。看来您的通用构建已设置为构建 odexed apk,这就是 apk 内没有 classes.dex 的原因。

. build/envsetup.sh
lunch vision-userdebug # or -eng or -user
mmm packages/apps/Contacts

关于java - Android APK 无法安装在设备上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17425226/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com