Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我导入项目之后报了注解的错误,然后我是这样修改的 #5

Open
EugeniaGao opened this issue Sep 20, 2022 · 0 comments

Comments

@EugeniaGao
Copy link

app的build.gradle
`
apply plugin: 'com.android.application'
//apply plugin:'android-apt'
def AAVersion='3.3.2'

android {
compileSdkVersion 23

defaultConfig {
    applicationId "com.syd.oden.gesturelock"
    minSdkVersion 18
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    // 显式声明支持注解
    javaCompileOptions{
        annotationProcessorOptions {
            arguments = [
                    'resourcePackageName': "com.syd.oden.odendemo",
                    "androidManifestFile": "$projectDir/src/main/AndroidManifest.xml".toString()
            ]

        }

    }

}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:23.1.1'
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation files('libs/androidannotations-3.3.2.jar')
implementation project(':odenlib')
implementation project(':gesturelock')
}

/apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName "com.syd.oden.odendemo"
}
}
/

`

工程的build.gradle
`
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4+'

    classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // Add this line

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
jcenter()
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant