完全创建了一个Android应用。现在,此应用在Playstore上。问题是,一些用户正在审查他们无法打开此应用程序。闪屏后此应用程序将停止。但是我的手机和android模拟器运行正常。但是虽然我将更改gradle构建版本,但会导致用户评论。它真的停止了。现在我想解决这个问题,所以尝试了。请向我解释如何解决此错误问题。
我的第一个gradle文件正在工作。但是第二个gradle文件正在解决此问题。
第一
gradle.build
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "net.gurujibd.test"
minSdkVersion 12
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:recyclerview-v7:24.0.+'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.squareup.picasso:picasso:2.5.0'
compile files('libs/awais.jar')
compile 'com.android.support:support-vector-drawable:24.2.1'
compile 'com.android.support:multidex:1.0.1'
compile project(':dBPullToRefresh')
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
第二次摇篮
gradle.build
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "net.gurujibd.test"
minSdkVersion 15
targetSdkVersion 28
versionCode 3
versionName "1.2"
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0-beta01'
implementation 'com.android.support:design:28.0.0-beta01'
implementation 'com.android.support:recyclerview-v7:28.0.0-beta01'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.google.android.gms:play-services:10.0.1'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.squareup.picasso:picasso:2.5.0'
implementation files('libs/awais.jar')
implementation 'com.android.support:support-vector-drawable:28.0.0-beta01'
implementation 'com.android.support:multidex:1.0.1'
implementation project(':dBPullToRefresh')
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation "com.android.support:support-v4:+"
}
dBPullToRefresh gradle.build
apply plugin: 'com.android.library'
android {
compileSdkVersion 16
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 4
targetSdkVersion 4
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
}
错误
java.util.concurrent.ExecutionException: com.google.android.apps.gsa.sidekick.main.h.n: Could not complete scheduled request to refresh entries. ClientErrorCode: 3
at com.google.common.util.concurrent.d.eA(SourceFile:85)
at com.google.common.util.concurrent.d.get(SourceFile:23)
at com.google.common.util.concurrent.l.get(SourceFile:2)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.cbB(SourceFile:49)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.cbA(SourceFile:181)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.bh.run(Unknown Source:2)
at com.google.android.apps.gsa.shared.util.concurrent.at.run(SourceFile:4)
答案 0 :(得分:1)
请执行以下操作,并告诉我是否可以解决问题。
首先,更改
buildToolsVersion '27.0.3'
到
buildToolsVersion '28.0.0'
然后,更改这些代码行
implementation 'com.android.support:appcompat-v7:28.0.0-beta01'
implementation 'com.android.support:design:28.0.0-beta01'
implementation 'com.android.support:recyclerview-v7:28.0.0-beta01'
implementation 'com.android.support:support-vector-drawable:28.0.0-beta01'
使用这些代码行
implementation 'com.android.support:appcompat-v7:28.0.+'
implementation 'com.android.support:design:28.0.+'
implementation 'com.android.support:recyclerview-v7:28.0.+'
implementation 'com.android.support:support-vector-drawable:28.0.+'
现在按 立即同步 并运行您的代码。
PS:Android Studio可能会提示您下载某些程序包(如果它们尚不可用),请允许它下载。
答案 1 :(得分:0)
您确定问题出自Gradle吗?使用fabric.io
之类的崩溃报告器