gradle 빌드 도구를 실험버전으로 변경한 것이다. Sync Now 혹은 Sync Project with gradle files 버튼을 눌러 변경사항을 적용한다.
Gradle 2.5 Wrapper 받기
변경사항을 적용하면 'com.android.application' 플러그인을 찾을 수 없다고 오류가 발생한다. Gradle 2.5에서는 Model 컴포넌트 기반으로 DSL이 변경되어 플러그인 이름도 변경되었기 때문이다. 플러그인 이름을 수정하기 전에 gradle 2.5 wrapper 를 먼저 설정하는 것이 편하다.
gradlew을 실행하면 방금전 수정한 gradle-wrapper.properties 을 참고하여 gradle-wrapper 를 받아온다.
$ ./gradlew
burtui-MacBook-Pro:HelloJNI burt$ ls
HelloJNI.iml gradle local.properties
app gradle.properties settings.gradle
build gradlew
build.gradle gradlew.bat
burtui-MacBook-Pro:HelloJNI burt$ ./gradlew
Downloading https://services.gradle.org/distributions/gradle-2.5-all.zip
....................................................................
....................................................................
......................................................
Unzipping /Users/burt/.gradle/wrapper/dists/gradle-2.5-all/6tdnp495tme25pie7btkiam828/gradle-2.5-all.zip to /Users/burt/.gradle/wrapper/dists/gradle-2.5-all/6tdnp495tme25pie7btkiam828
Set executable permissions for: /Users/burt/.gradle/wrapper/dists/gradle-2.5-all/6tdnp495tme25pie7btkiam828/gradle-2.5/bin/gradle
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/burt/Projects/Repository/Study/temp/HelloJNI/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.android.application' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 44.328 secs
burtui-MacBook-Pro:HelloJNI burt$
gradle 2.5 wrapper 를 받은 다음 자동으로 빌드를 수행한다. 아직 플러그인과 모듈의 build.gradle 을 모델 기반의 DSL로 변경하지 않았기 때문에 빌드는 실패한다.