我開始了一個新項目并放置了火基云:apply plugin: 'com.android.application'apply plugin: 'android-apt'android { compileSdkVersion 28 buildToolsVersion "28.0.3" defaultConfig { applicationId "android.example.com.squawker" minSdkVersion 16 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }}dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) //noinspection GradleCompatible implementation 'com.android.support:appcompat-v7:28.0.0' testImplementation 'junit:junit:4.12'// RecyclerViewimplementation 'com.android.support:recyclerview-v7:28.0.0'// Schematic dependencies for ContentProviderapt 'net.simonvt.schematic:schematic-compiler:0.6.3'implementation 'net.simonvt.schematic:schematic:0.6.3'// Preferences Dependenciesimplementation 'com.android.support:preference-v7:28.0.0'// Firebase dependency implementation 'com.google.firebase:firebase-messaging:17.3.4'}// Apply the Google Services plugin. Make sure to add the google-services.json file in the app// folder. You download it from the Firebase consoleapply plugin: 'com.google.gms.google-services'這個錯誤出現了:警告:API 'variant.getJavaCompile()' 已過時,已替換為 'variant.getJavaCompileProvider()'。它將在 2019 年底被刪除。有關更多信息,請參閱https://d.android.com/r/tools/task-configuration-avoidance。要確定調用 variant.getJavaCompile() 的內容,請在命令行上使用 -Pandroid.debug.obsoleteApi=true 以顯示堆棧跟蹤。受影響的模塊:app
2 回答

嗶嗶one
TA貢獻1854條經驗 獲得超8個贊
這可能是因為apt 插件已經過時了。因此,您需要刪除以下內容:
apply plugin: 'android-apt'
然后更改以下內容:
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
和:
annotationProcessor 'net.simonvt.schematic:schematic-compiler:0.6.3'

PIPIONE
TA貢獻1829條經驗 獲得超9個贊
添加回答
舉報
0/150
提交
取消