私はAndroidの開発にはまったく新しいものですが、間違いかもしれないと思います。私はcompileSdkVersion 25
と私のbuild.gradleファイルで作業しています。しかし、Android 4.1以降ではアプリケーションのサポートが必要です。あなたのAndroidアプリをダウングレードする正しい方法は何ですか?
しかし、Android 4.1システムでアプリケーションを実行すると、すぐにシャットダウンされます(サポートされていないため)。
私はcompileSdkVersion 25
をcompileSdkVersion 16
に変更しようとしましたが、これにより多くのエラーが発生します(なぜですか)。それは、Android 4.1でサポートされていないEvery Little Thingの変更を開始するような迷惑なんだ、そう...
質問: あなたのAndroidアプリケーションをダウングレードするための正しい方法は何ですか?
現在のbuild.gradle:このため
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "xxxx"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resValue "string", "google_maps_key", (project.findProperty("GOOGLE_MAPS_API_KEY") ?: "")
multiDexEnabled true
useLibrary 'org.apache.http.legacy'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.google.android.gms:play-services:9.8.0'
compile 'com.google.firebase:firebase-core:9.8.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
}
このエラーはおそらく上位バージョンの互換性のないコードが原因で発生している可能性があります。サポートライブラリを使用していくつかの下位互換性のあるコードを使用する必要があるかもしれません。 – Enzokie
@Enzokieはい私はそれを知っていますが、私はそうする簡単な方法を見つけようとしています。 – Guido
* Android 4.1でサポートされていないすべての小さなものの変更を開始するのは面倒です。他のオプションはありません –