- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我刚刚将我的应用发布到 Google Play 商店,签名的 apk 已成功发布。但是,(我已经在三款不同的手机和平板电脑上尝试过),从商店下载该应用程序后拒绝安装。单击“安装”按钮后,应用程序将下载,状态将变为“正在安装...”,然后出现以下对话框:
可以做什么?
有助于故障排除的有关我的应用的事实:
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;
}
}
// 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()
}
}
注意:这很难用谷歌搜索,因为大多数答案都与客户端有关,即用户在尝试下载应用程序时遇到此错误。
使用 adb install
手动安装已签名的 apk 会产生失败 [INSTALL_FAILED_DEXOPT]
和以下 logcat 堆栈跟踪。
应该注意的是,通过 android studio 在我的手机上运行应用程序的调试版本(minSdkVersion
为 21)可以完美运行。
这可能与 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 OFF
11-19 15:50:58.642 19186-19186/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm
11-19 15:50:58.706 3907-3907/? D/Finsky: [1] PackageVerificationReceiver.onReceive: Verification requested, id = 37
11-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=false
11-19 15:50:59.860 3907-3934/? I/qtaguid: Failed write_ctrl(u 44) res=-1 errno=22
11-19 15:50:59.860 3907-3934/? I/qtaguid: Untagging socket 44 failed errno=-22
11-19 15:50:59.860 3907-3934/? W/NetworkManagementSocketTagger: untagSocket(44) failed with errno -22
11-19 15:50:59.863 3907-3907/? D/Finsky: [1] 2.onResponse: Verification id=37 response=0
11-19 15:50:59.877 3907-3907/? D/Finsky: [1] PackageVerificationReceiver.onReceive: Verification requested, id = 37
11-19 15:50:59.890 19017-19033/? D/DefContainer: Copying /data/local/tmp/io.givenow.app to base.apk
11-19 15:51:00.633 809-869/? D/PackageManager: Renaming /data/app/vmdl171337004.tmp to /data/app/io.givenow.app-1
11-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=false
11-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=24
11-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.ListView
11-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), code 1, fault addr 0xd94e27a4 in tid 19203 (main)
11-19 15:51:06.102 19203-19205/? A/libc: Fatal signal 11 (SIGSEGV), code 1, 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 0xd94e27a4
11-19 15:51:06.168 809-1027/? W/NativeCrashListener: Couldn't find ProcessRecord for pid 19203
11-19 15:51:06.193 351-351/? I/DEBUG: r0 b163600c r1 13f513f4 r2 b15af000 r3 0008700c
11-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 d94d8807
11-19 15:51:06.193 351-351/? I/DEBUG: r8 b6f70a70 r9 d94d8804 sl b6a46df4 fp 00000000
11-19 15:51:06.194 351-351/? I/DEBUG: ip 00000000 sp b0dffb20 lr b6d47065 pc b6d46e26 cpsr 80070030
11-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.so
11-19 15:51:06.194 351-351/? I/DEBUG: #04 pc 0013f25d /system/lib/libart-compiler.so
11-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=0000000b
11-19 15:51:06.452 351-351/? E/DEBUG: tid exited before attach completed: tid 19203
11-19 15:51:06.453 355-355/? E/installd: DexInv: --- END '/data/app/io.givenow.app-1/base.apk' --- status=0x000b, process failed
11-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.access$2300(PackageManagerService.java:234)
at com.android.server.pm.PackageManagerService$6.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.174ms
11-19 15:51:06.584 19186-19186/? I/art: System.exit called, status: 1
11-19 15:51:06.584 19186-19186/? I/AndroidRuntime: VM exiting with result code 1.
以上给出了更多的线索。看起来 dex2oat 因编译器驱动程序中的 SIGSEGV 而失败。我将继续谷歌搜索;到目前为止,这似乎不像其他包安装失败的人遇到的更常见的 LinearAlloc
限制。
我现在可以通过启用 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
对于多 dexed 应用程序已损坏。更改为 buildToolsVersion "23.0.1"
在 devDebug
和 中生成工作、可安装的构建>产品发布
。
(正如我的帖子所提到的,前者不运行混淆器,后者运行,并且两种版本都针对 17 的 minSdkVersion
)。
这耗费了整整两天。我希望这能节省其他人的时间,至少在 23.0.3
发布之前!
关于android - 我新发布的应用无法安装 : Error code: -504,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33781210/
reqwest v0.9 将 serde v1.0 作为依赖项,因此实现 converting serde_json errors into reqwest error . 在我的代码中,我使用 se
我有这个代码: let file = FileStorage { // ... }; file.write("Test", bytes.as_ref()) .map_err(|e| Mu
我只是尝试用angular-cli创建一个新项目,然后运行服务器,但是它停止并显示一条有趣的消息:Error: No errors。 我以这种方式更新了(希望有帮助):npm uninstall -g
我从我的 javascript 发送交易 Metamask 打开传输对话框 我确定 i get an error message in metamask (inpage.js:1 MetaMask -
这个问题在这里已经有了答案: How do you define custom `Error` types in Rust? (3 个答案) How to get a reference to a
我想知道两者之间有什么大的区别 if let error = error{} vs if error != nil?或者只是人们的不同之处,比如他们如何用代码表达自己? 例如,如果我使用这段代码: u
当我尝试发送超过 50KB 的图像时,我在 Blazor 服务器应用程序上收到以下错误消息 Error: Connection disconnected with error 'Error: Serv
我有一个error-page指令,它将所有异常重定向到错误显示页面 我的web.xml: [...] java.lang.Exception /vi
我有这样的对象: address: { "phone" : 888, "value" : 12 } 在 WHERE 中我需要通过 address.value 查找对象,但是在 SQL 中有函数
每次我尝试编译我的代码时,我都会遇到大量错误。这不是我的代码的问题,因为它在另一台计算机上工作得很好。我尝试重新安装和修复,但这没有帮助。这是整个错误消息: 1>------ Build starte
在我的代码的类部分,如果我写一个错误,则在不应该的情况下,将有几行报告为错误。我将'| error'放在可以从错误中恢复的良好/安全位置,但是我认为它没有使用它。也许它试图在某个地方恢复中间表情? 有
我遇到了 csv 输入文件整体读取故障的问题,我可以通过在 read_csv 函数中添加 "error_bad_lines=False" 来删除这些问题来解决这个问题。 但是我需要报告这些造成问题的文
在 Spring 中,验证后我们在 controller 中得到一个 BindingResult 对象。 很简单,如果我收到验证错误,我想重新显示我的表单,并在每个受影响的字段上方显示错误消息。 因此
我不知道出了什么问题,因为我用 Java 编程了大约一年,从来没有遇到过这个错误。在一分钟前在 Eclipse 中编译和运行工作,现在我得到这个错误: #A fatal error has been
SELECT to_char(messages. TIME, 'YYYY/MM/DD') AS FullDate, to_char(messages. TIME, 'MM/DD
我收到这些错误: AnonymousPath\Anonymized.vb : error BC30037: Character is not valid. AnonymousPath\Anonymiz
我刚刚安装了 gridengine 并在执行 qstat 时出现错误: error: commlib error: got select error (Connection refused) erro
嗨,我正在学习 PHP,我从 CRUD 系统开始,我在 Windows 上安装了 WAMP 服务器,当我运行它时,我收到以下错误消息。 SCREAM: Error suppression ignore
我刚刚开始一个新项目,我正在学习核心数据教程,可以找到:https://www.youtube.com/watch?v=zZJpsszfTHM 我似乎无法弄清楚为什么会抛出此错误。我有一个名为“Exp
当我使用 Jenkins 运行新构建时,出现以下错误: "FilePathY\XXX.cpp : fatal error C1853: 'FilePathZ\XXX.pch' precompiled
我是一名优秀的程序员,十分优秀!