有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java原因:安卓apt插件与Android Gradle插件不兼容。请改用“annotationProcessor”配置

正如你从标题中看到的,我对安卓系统是新手。我正在使用Android studio 4.1.2并尝试测试一个旧的应用程序(因为我正在学习的Android课程很旧,但到目前为止它一直很有用)。 不管怎样,我在堆栈流中看到了很多相同错误的问题,我尝试过实现人们给出的每个解决方案,但没有一个对我有效。有没有一个善良的灵魂可以帮助我?这是我的毕业证书:

项目:

plugins {
   id 'com.安卓.application'
}

安卓 {
   compileSdkVersion 30
   buildToolsVersion "30.0.3"

   defaultConfig {
       applicationId "com.app.persistencia"
       minSdkVersion 16
       targetSdkVersion 30
       versionCode 1
       versionName "1.0"
       testInstrumentationRunner "安卓x.test.runner.AndroidJUnitRunner"
   }

   buildTypes {
       release {
           minifyEnabled false
           proguardFiles getDefaultProguardFile('proguard-安卓-optimize.txt'), 'proguard-rules.pro'
       }
   }
   compileOptions {
       sourceCompatibility JavaVersion.VERSION_1_8
       targetCompatibility JavaVersion.VERSION_1_8
   }
}

dependencies {
   implementation '安卓x.appcompat:appcompat:1.3.0'
   implementation 'com.google.安卓.material:material:1.3.0'
   implementation '安卓x.constraintlayout:constraintlayout:2.0.4'
   testImplementation 'junit:junit:4.+'
   安卓TestImplementation '安卓x.test.ext:junit:1.1.2'
   安卓TestImplementation '安卓x.test.espresso:espresso-core:3.3.0'
   apply plugin: 'realm-安卓'
}

模块:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
   repositories {
       google()
       jcenter()
   }
   dependencies {
       classpath "com.安卓.tools.build:gradle:4.1.2"
       classpath "io.realm:realm-gradle-plugin:1.2.0"
       // 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
}

提前谢谢


共 (0) 个答案