7

저는 AndroidAnnotaion을 사용하고 있지만 Android Studio 2.3 및 Gradle 2.3.0 덕분에 그들은 android-apt이 폐기되었습니다. 그리고 annotationProcessor은 새로운 것입니다. 그래서, 전에 apt과 같이 annotationProcessor을 구성 할 수 있는지 알고 싶습니다.annotationprocessor 및 apt는 해당 구성을 구성합니다.

내가 잘못 이해하면 도움을 받으십시오.

그래서, 전 ... 당신은 다음과 같은 방법으로 주석 처리 구성 옵션을 전달할 수

dependencies { 

    def AAVersion = '4.2.0' 
    annotationProcessor "org.androidannotations:androidannotations:$AAVersion" 
    compile "org.androidannotations:androidannotations-api:$AAVersion" 
} 
+0

이전 가이드를 확인 했습니까? https://bitbucket.org/hvisser/android-apt/wiki/Migration –

+0

당신이'android-apt'와 같이 인자를 설정해야하는 것처럼 보입니다. – botteaap

+0

@botteaap 예 ... –

답변

3

apply plugin: 'android-apt' 

dependencies { 

    def AAVersion = '4.2.0' 
    apt "org.androidannotations:androidannotations:$AAVersion" 
    compile "org.androidannotations:androidannotations-api:$AAVersion" 
} 

apt { 
    arguments { 
     library 'true' 
    } 
} 

지금은 ... :

android { 
    defaultConfig { 
    javaCompileOptions { 
     annotationProcessorOptions { 
     arguments = ['library': 'true'] 
     } 
    } 
    } 
} 
관련 문제