我有一个古老的经典游戏攀冰者,它工作得很好,但不幸的是,谷歌更新了条款,使所有应用 targetSdkVersion
至少达到26。
但是在 logCat 中出现错误:
09-09 15:21:22.934 396-396/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'HUAWEI/KII-L21/HWKII-Q:6.0.1/HUAWEIKII-L21/C185B321:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 9249, tid: 9249, name: XX.XXX:emulator >>> XX.XXX.XXX:emulator <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-09 15:21:22.954 396-396/? A/DEBUG: r0 00000000 r1 ac21b450 r2 abb85d00 r3 f355800c
r4 ab2ac2f0 r5 ffa398b4 r6 ac21b450 r7 ffa398b0
r8 abb85d00 r9 ffffffff sl ffa398c0 fp ab2abce0
ip 00000000 sp ffa39868 lr f3553eef pc f3553e3e cpsr 000f0030
09-09 15:21:22.974 396-396/? A/DEBUG: backtrace:
#00 pc 00001e3e /data/app/XXX.XXX.XXX-1/lib/arm/libemu.so
#01 pc 000ead49 /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
#02 pc 000e6651 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
#03 pc 003eb9cf /system/lib/libart.so (art_quick_invoke_stub+170)
#04 pc 007fb9fc [stack]
我以前的Gradle成功运行应用程序的代码是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 14
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "XXX.XXX.XXX"
minSdkVersion 14
targetSdkVersion 9
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
sourceSets {
main {
jni.srcDirs = []
}
}
productFlavors {
}
}
dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-ads:9.8.0'
api 'com.github.bumptech.glide:glide:3.7.0'
}
我新的Gradke更新以支持新条款(针对API 26):
之所以添加'com.android.application'
是因为我使用的是新版Android中不推荐使用的某些方法。
apply plugin: 'com.android.application'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "XXX.XXX.XXX"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
sourceSets {
main {
jni.srcDirs = []
}
}
productFlavors {
}
}
dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-ads:15.0.1'
api 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
}
一些其他信息可能会有所帮助:
我的应用是运行Nesoid文件(游戏)的经典游戏
在我的
jniLibs
文件夹中,有两个armeabi文件夹armeabi
和armeabi-v7a
我知道您可能需要更多详细信息,但我不知道需要什么来提供更多帮助。