EboMike:
私のコードベースは、ラムダのようないくつかのJava 8の構文を使用し、最も長い時間のために罰金を働いてきました。
最近では、モジュールの私のインストルメントテストは、悪名高いメッセージでの作業を停止しました:
AGPBI:{ "種類": "エラー"、 "テキスト": "起動-習慣のみアンドロイドO(--min-API 26)で始まるサポートされている"、 "ソース":[{}]、 "ツール":」 D8" }
これは、既知の問題(存在している多くの 質問を参照)が、しかし、私は私でJava 1.8持っていますcompileOptions
:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
この問題は、インストルメントテスト(すなわちandroidTest)に表示されます。これは、ユニットテストでアプリ自体で大丈夫です。私はすでに、インストルメントテストからすべてのテストが、問題のが持続をコメントアウト。
私のユニットテストとAndroidのテストは、同じ依存関係を持っています。私はAndroidXテストに変換しますが、問題が持続します。
dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
androidTestImplementation 'org.mockito:mockito-core:2.27.0'
androidTestImplementation 'androidx.test:core:1.1.0'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.ext:truth:1.1.0'
androidTestImplementation 'com.google.truth:truth:0.42'
testImplementation 'org.mockito:mockito-core:2.27.0'
testImplementation 'androidx.test:core:1.1.0'
testImplementation 'androidx.test:runner:1.1.1'
testImplementation 'androidx.test:rules:1.1.1'
testImplementation 'androidx.test.ext:junit:1.1.0'
testImplementation 'androidx.test.ext:truth:1.1.0'
testImplementation 'com.google.truth:truth:0.42'
}
私は、最新のコンパイルとターゲットバージョン(私も26と27を試してみました)ともビルドツールを使用しています。分SDKのバージョンは14で、である必要があります。
compileSdkVersion 28
buildToolsVersion '29.0.0 rc3'
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
}
EboMike:
これは、Android Studioの3.5ベータ版のバグです。私は、提出されたAndroidのスタジオチームでバグを、そしてこれは、Android Studioの3.5ベータ03ビルドツールで修正される予定です。