compileSdkVersion 29 buildToolsVersion "29.0.0"
おはようございます。上記の設定でプロジェクトを作成し終えた後、APIレベルの低いデバイスに対応する為にminSdkVersion 21
を設定し、NexusS(API 22)とNexus4(API21)のエミュレーターデバイスでアプリを起動すると"Run"の部分に以下のエラがー表示されるようになりました。StackOverFlowの類似した質問への回答を参考にAVDManagerからWipe Dataを実行してみたものの同じエラーが返ってきます。kotlin初心者でGradleの部分は特に手探り状態で進めているのですが、どうアプローチすべきかアドバイスを頂けないでしょうか?
ちなみにNexus5X(API 29と26)のエミュレーターではアプリは正常に起動します。
Failure
1Failure [INSTALL_FAILED_DEXOPT] 2Error while Installing APK
参考にしたサイト
https://stackoverflow.com/questions/5153515/how-do-i-solve-the-install-failed-dexopt-error
https://stackoverflow.com/questions/50457886/error-install-failed-dexopt-in-android-5-1
https://github.com/realm/realm-java/issues/3124
等々
buildGradle(app)
android { compileSdkVersion 29 buildToolsVersion "29.0.0" defaultConfig { applicationId "mogumogu.pakupaku.android" minSdkVersion 21 targetSdkVersion 29 versionCode 7 versionName "1.0.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.core:core-ktx:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' }
buildGradle(project)
buildscript { ext.kotlin_version = '1.3.31' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
あなたの回答
tips
プレビュー