亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

出現此錯誤時如何修復gradle?

出現此錯誤時如何修復gradle?

精慕HU 2022-06-23 16:54:37
我開始了一個新項目并放置了火基云: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'


查看完整回答
反對 回復 2022-06-23
?
PIPIONE

TA貢獻1829條經驗 獲得超9個贊

查看完整回答
反對 回復 2022-06-23
  • 2 回答
  • 0 關注
  • 161 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號