android – 我新发布的应用程序无法安装:错误代码:-504

android – 我新发布的应用程序无法安装:错误代码:-504,第1张

概述我刚刚将我的应用程序发布到Google Play商店,并且签名的“apk”已成功发布.但是,(我已经尝试过三种不同的手机和平板电脑),该应用程序拒绝从商店下载安装.点击“安装”按钮后,应用程序将下载,状态将更改为“安装…”,然后出现以下对话框: 可以做什么 有关我的应用程序的事实可以帮助故障排除: >该应用程序的目标是API22,minSDK为17. >我没有使用proguard. >该应用程序通 我刚刚将我的应用程序发布到Google Play商店,并且签名的“apk”已成功发布.但是,(我已经尝试过三种不同的手机和平板电脑),该应用程序拒绝从商店下载安装.点击“安装”按钮后,应用程序将下载,状态将更改为“安装…”,然后出现以下对话框:

可以做什么

有关我的应用程序的事实可以帮助故障排除:

>该应用程序的目标是API22,minSDK为17.
>我没有使用proguard.
>该应用程序通过multIDex支持库使​​用multIDex.

应用程序/的build.gradle:

buildscript {    repositorIEs {        maven { url 'https://maven.fabric.io/public' }    }    dependencIEs {        classpath 'io.fabric.tools:gradle:1.+'    }}apply plugin: 'com.androID.application'apply plugin: 'me.tatarka.retrolambda'apply plugin: 'io.fabric'repositorIEs {    maven { url 'https://maven.fabric.io/public' }    jcenter()}androID {    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }    compileSdkVersion 23    buildToolsversion "23.0.2"    defaultConfig {        applicationID "io.giveNow.app"        minSdkVersion 17        targetSdkVersion 22        versionCode 1        versionname "1.0"        // Enabling multIDex support.        multIDexEnabled true    }    signingConfigs {        deBUG {            storefile file('../deBUG.keystore')        }        release    }    productFlavors {        // define separate dev and prod product flavors.        dev {            // dev utilizes minSDKVersion = 21 to allow the AndroID gradle plugin            // to pre-dex each module and produce an APK that can be tested on            // AndroID Lollipop without time consuming dex merging processes.            minSdkVersion 17        }        prod {            // The actual minSdkVersion for the application.            minSdkVersion 17        }    }    buildTypes {        deBUG {            MinifyEnabled false        }        release {            signingConfig signingConfigs.release            MinifyEnabled false            proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro'        }    }}apply from: 'https://raw.github.com/trikita/gradle-androID-signing/master/gradle-androID-signing.gradle'dependencIEs {    compile 'com.androID.support:multIDex:1.0.1'    compile 'com.Google.guava:guava:18.0'    compile 'org.functionaljava:functionaljava:4.4'    compile 'io.reactivex:rxandroID:1.0.1'    // Because RxAndroID releases are few and far between,it is recommended you also    // explicitly depend on RxJava's latest version for BUG fixes and new features.    compile 'io.reactivex:rxjava:1.0.14'    compile filetree(include: ['*.jar'],dir: 'libs')    compile 'com.androID.support:support-v4:23.1.1'    compile 'com.androID.support:support-v13:23.1.1'    compile 'com.Google.androID.gms:play-services-maps:8.3.0'    compile 'com.Google.androID.gms:play-services-location:8.3.0'    compile 'com.androID.support:appcompat-v7:23.1.1'    compile 'com.androID.support:design:23.1.1'    compile 'com.androID.support:cardvIEw-v7:23.1.1'    compile 'com.androID.support:palette-v7:23.1.1'    compile 'com.jakewharton:butterknife:7.0.1'    compile 'com.Google.maps.androID:androID-maps-utils:0.4'    compile 'com.github.chrisbanes.actionbarpulltorefresh:library:0.9.9'    compile 'com.nhaarman.ListvIEwanimations:library:2.6.0'    compile 'com.squareup.picasso:picasso:2.5.2'    compile 'de.hdodenhof:circleimagevIEw:2.0.0'    //    compile 'jp.wasabeef:recyclervIEw-animators:2.0.1'    compile 'com.bartoszlipinski:vIEwpropertyobjectanimator:1.1.0'    //    compile 'com.androIDmapsextensions:androID-maps-extensions:2.1.0+'    compile 'com.parse.bolts:bolts-androID:1.2.1'    compile 'com.parse:parse-androID:1.10.3'    compile 'com.parse:parseui-login-androID:0.0.1'    compile 'com.parse:parseui-Widget-androID:0.0.1'    // Uncomment if using Facebook Login (optional Maven dependency)    //    compile 'com.facebook.androID:facebook-android-sdk:4.6.0'    //    compile filetree(dir: 'libs',include: 'Parse-*.jar')    //    compile filetree(dir: 'libs',include: 'ParseCrashReporting-*.jar')    compile('de.keyboardsurfer.androID.Widget:crouton:1.8.4@aar') { //maybe drop the @aar later        // exclusion is not neccessary,but generally a good IDea.        exclude group: 'com.Google.androID',module: 'support-v4'    }    //    compile project(':stripe')    //    compile 'io.card:androID-sdk:5.0.1'    //    compile 'com.astuetz:pagerslIDingtabstrip:1.0.1'    // fork of Pager SlIDing Tab Strip that supports colorStateLists for tab text color.    // https://github.com/magicgoose/PagerSlIDingTabStrip    compile project(':PagerSlIDingTabStrip-magicgoose-1c26523:library')    //    compile project(':recyclervIEw-animators')    compile project(':animators')    compile('com.crashlytics.sdk.androID:crashlytics:2.5.3@aar') {        transitive = true;    }}

顶级build.gradle:

// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    repositorIEs {        mavenCentral()    }    dependencIEs {        classpath 'com.androID.tools.build:gradle:1.5.0'        classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'    }}plugins {    ID "me.tatarka.retrolambda" version "3.2.3"}allprojects {    repositorIEs {        mavenCentral()    }}

注意:这是很难Google,因为大多数答案都处理客户端,即用户在尝试下载应用程序时收到此错误.

更新1 2:

使用adb安装手动安装签名的apk会导致失败[INSTALL_Failed_DEXOPT]和以下logcat堆栈跟踪.

应该注意的是,通过androID工作室在我的手机上运行调试版本的应用程序(具有21的minSdkVersion)完美无缺.

这可能与multIDex有关.当我将minSdkVersion更改为21时,应用程序安装正常.但是如果我把它改为17,那就失败了.以下是上述堆栈跟踪的扩展版本:

11-19 15:50:58.474 19186-19186/? D/AndroIDRuntime: >>>>>> START com.androID.internal.os.RuntimeInit uID 2000 <<<<<<11-19 15:50:58.477 19186-19186/? D/AndroIDRuntime: CheckJNI is OFF11-19 15:50:58.642 19186-19186/? D/AndroIDRuntime: Calling main entry com.androID.commands.pm.Pm11-19 15:50:58.706 3907-3907/? D/Finsky: [1] PackageVerificationReceiver.onReceive: Verification requested,ID = 3711-19 15:50:58.713 3907-3907/? D/Finsky: [1] WorkerTask.onPreExecute: Verification Requested for ID = 37,data=file:///data/local/tmp/io.giveNow.app flags=114 fromVerificationActivity=false11-19 15:50:59.860 3907-3934/? I/qtaguID: Failed write_ctrl(u 44) res=-1 errno=2211-19 15:50:59.860 3907-3934/? I/qtaguID: Untagging socket 44 Failed errno=-2211-19 15:50:59.860 3907-3934/? W/NetworkManagementSocketTagger: unTagsocket(44) Failed with errno -2211-19 15:50:59.863 3907-3907/? D/Finsky: [1] 2.onResponse: Verification ID=37 response=011-19 15:50:59.877 3907-3907/? D/Finsky: [1] PackageVerificationReceiver.onReceive: Verification requested,ID = 3711-19 15:50:59.890 19017-19033/? D/DefContainer: copying /data/local/tmp/io.giveNow.app to base.apk11-19 15:51:00.633 809-869/? D/PackageManager: Renaming /data/app/vmdl171337004.tmp to /data/app/io.giveNow.app-111-19 15:51:00.660 809-869/? I/PackageManager: Running dexopt on: /data/app/io.giveNow.app-1/base.apk pkg=io.giveNow.app isa=arm vmSafeMode=false11-19 15:51:00.711 19203-19203/? I/dex2oat: /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/io.giveNow.app-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/arm/data@app@io.giveNow.app-1@base.apk@classes.dex --instruction-set=arm --instruction-set-features=div --runtime-arg -xms64m --runtime-arg -Xmx512m --swap-fd=2411-19 15:51:01.187 19203-19203/? I/dex2oat: DecIDed to run without swap.11-19 15:51:01.560 19203-19206/? W/dex2oat: Before AndroID 4.1,method int androID.support.v7.internal.Widget.ListVIEwCompat.lookForSelectableposition(int,boolean) would have incorrectly overrIDden the package-private method in androID.Widget.ListVIEw11-19 15:51:06.063 19203-19207/? A/libc: Fatal signal 11 (SIGSEGV),code 1,fault addr 0xd94e27a4 in tID 19207 (Compiler driver)11-19 15:51:06.066 19203-19203/? A/libc: Fatal signal 11 (SIGSEGV),fault addr 0xd94e27a4 in tID 19203 (main)11-19 15:51:06.102 19203-19205/? A/libc: Fatal signal 11 (SIGSEGV),fault addr 0xd94e27a4 in tID 19205 (Compiler driver)11-19 15:51:06.166 351-351/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***11-19 15:51:06.166 351-351/? I/DEBUG: Build fingerprint: 'Google/shamu/shamu:5.1.1/LMY47Z/1860966:user/release-keys'11-19 15:51:06.166 351-351/? I/DEBUG: Revision: '33696'11-19 15:51:06.167 351-351/? I/DEBUG: ABI: 'arm'11-19 15:51:06.167 351-351/? I/DEBUG: pID: 19203,tID: 19207,name: Compiler driver  >>> /system/bin/dex2oat <<<11-19 15:51:06.167 351-351/? I/DEBUG: signal 11 (SIGSEGV),code 1 (SEGV_MAPERR),fault addr 0xd94e27a411-19 15:51:06.168 809-1027/? W/NativeCrashListener: Couldn't find ProcessRecord for pID 1920311-19 15:51:06.193 351-351/? I/DEBUG:     r0 b163600c  r1 13f513f4  r2 b15af000  r3 0008700c11-19 15:51:06.193 351-351/? E/DEBUG: AM write failure (32 / broken pipe)11-19 15:51:06.193 351-351/? I/DEBUG:     r4 000013f4  r5 d94d87f4  r6 73406b18  r7 d94d880711-19 15:51:06.193 351-351/? I/DEBUG:     r8 b6f70a70  r9 d94d8804  sl b6a46df4  fp 0000000011-19 15:51:06.194 351-351/? I/DEBUG:     ip 00000000  sp b0dffb20  lr b6d47065  pc b6d46e26  cpsr 8007003011-19 15:51:06.194 351-351/? I/DEBUG:     #00 pc 000dbe26  /system/lib/libart.so (art::Classlinker::ResolveMethodExceptionHandlerTypes(art::Dexfile const&,art::mirror::ArtMethod*)+81)11-19 15:51:06.194 351-351/? I/DEBUG:     #01 pc 000dc061  /system/lib/libart.so (art::Classlinker::ResolveClassExceptionHandlerTypes(art::Dexfile const&,art::Handle<art::mirror::Class>)+108)11-19 15:51:06.194 351-351/? I/DEBUG:     #02 pc 000dc28b  /system/lib/libart.so (art::Classlinker::VerifyClass(art::Handle<art::mirror::Class>)+518)11-19 15:51:06.194 351-351/? I/DEBUG:     #03 pc 00145be1  /system/lib/libart-compiler.so11-19 15:51:06.194 351-351/? I/DEBUG:     #04 pc 0013f25d  /system/lib/libart-compiler.so11-19 15:51:06.194 351-351/? I/DEBUG:     #05 pc 002438ed  /system/lib/libart.so (art::ThreadPoolWorker::Run()+44)11-19 15:51:06.194 351-351/? I/DEBUG:     #06 pc 002441ed  /system/lib/libart.so (art::ThreadPoolWorker::Callback(voID*)+60)11-19 15:51:06.194 351-351/? I/DEBUG:     #07 pc 00016baf  /system/lib/libc.so (__pthread_start(voID*)+30)11-19 15:51:06.194 351-351/? I/DEBUG:     #08 pc 00014af3  /system/lib/libc.so (__start_thread+6)11-19 15:51:06.403 809-850/? I/BootReceiver: copying /data/tombstones/tombstone_03 to DropBox (SYstem_TOMBSTONE)11-19 15:51:06.452 351-351/? E/DEBUG: unexpected waitpID response: n=19203,status=0000000b11-19 15:51:06.452 351-351/? E/DEBUG: tID exited before attach completed: tID 1920311-19 15:51:06.453 355-355/? E/installd: DexInv: --- END '/data/app/io.giveNow.app-1/base.apk' --- status=0x000b,process Failed11-19 15:51:06.457 809-869/? W/PackageManager: Package Couldn't be installed in /data/app/io.giveNow.app-1                                               com.androID.server.pm.PackageManagerException: scanPackageli                                                   at com.androID.server.pm.PackageManagerService.scanPackageDirtyli(PackageManagerService.java:5955)                                                   at com.androID.server.pm.PackageManagerService.scanPackageli(PackageManagerService.java:5267)                                                   at com.androID.server.pm.PackageManagerService.installNewPackageli(PackageManagerService.java:10177)                                                   at com.androID.server.pm.PackageManagerService.installPackageli(PackageManagerService.java:10707)                                                   at com.androID.server.pm.PackageManagerService.access00(PackageManagerService.java:234)                                                   at com.androID.server.pm.PackageManagerService.run(PackageManagerService.java:8627)                                                   at androID.os.Handler.handleCallback(Handler.java:739)                                                   at androID.os.Handler.dispatchMessage(Handler.java:95)                                                   at androID.os.Looper.loop(Looper.java:135)                                                   at androID.os.HandlerThread.run(HandlerThread.java:61)                                                   at com.androID.server.ServiceThread.run(ServiceThread.java:46)11-19 15:51:06.572 809-869/? I/art: Explicit concurrent mark sweep GC freed 121459(5MB) AllocSpace objects,34(4MB) LOS objects,27% free,41MB/57MB,paused 1.454ms total 81.174ms11-19 15:51:06.584 19186-19186/? I/art: System.exit called,status: 111-19 15:51:06.584 19186-19186/? I/AndroIDRuntime: VM exiting with result code 1.

上面给出了更多的线索.看来dex2oat在编译器驱动程序中与SIGSEGV失败.我要继续googling;到目前为止,这似乎并不像其他人正在运行的安装失败的人更常见的linearalloc限制.

更新3:

我现在可以通过启用ProGuard获得一个工作的prodRelease构建,并使用以下规则文件:

# Add project specific ProGuard rules here.-dontobfuscate #if obfuscation is enabled,we get "java.lang.NoSuchFIEldException: producerIndex" (wtf?)#Retrolambda-dontwarn java.lang.invoke.*-keep class butterknife.** { *; }-dontwarn butterknife.internal.**-keep class **$$VIEwBinder { *; }-keepclasseswithmembernames class * {    @butterknife.* <fIElds>;}-keepclasseswithmembernames class * {    @butterknife.* <methods>;}-keep class com.parse.* { *; }-dontwarn com.parse.**-dontwarn okio.**-dontwarn fj.**# Guava:-dontwarn sun.misc.Unsafe# Picasso-dontwarn com.squareup.okhttp.**

但是,devDeBUG构建仍然无法安装.

由于某种原因,我现在看到一个更详细的堆栈跟踪.请注意,发送到dex2oat的信号现在是SIGABRT而不是SIGSEGV:
http://pastebin.com/raw.php?i=rg5BnYst

解决方法 我得到它的工作!

多工程应用程序的版本23.0.2构建工具已损坏.

更改为buildToolsversion“23.0.1”在devDeBUG和prodRelease中都可以生成可安装的工作.

(正如我的帖子提到的,前者没有运行proguard,后者是,而且两种风格都瞄准了一个minSdkVersion 17).

这消耗了两整天.我希望这可以节省别人的时间,至少要23.0.3出来!

总结

以上是内存溢出为你收集整理的android – 我新发布的应用程序无法安装:错误代码:-504全部内容,希望文章能够帮你解决android – 我新发布的应用程序无法安装:错误代码:-504所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1132677.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存