지원되지 않는 메서드 : 프로젝트 실행 중 AndroidProject.getPluginGeneration ()
Android Studio 2.2로 프로젝트를 실행하려고하는데이 오류가 발생합니다.
Unsupported method: AndroidProject.getPluginGeneration().
The version of Gradle you connect to does not support that method.
ButterKnife 8.4.0을 사용하고 있습니다.
내 앱 gradle.file :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
내 모듈 gradle 파일 :
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "xxx.xx"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
}
dependencies {
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}
작동하지 않는 이유는 무엇이며 어떻게 해결합니까?
일반적인 문제 :-
AS가 Instant Run 기능의 가용성을 확인했기 때문에 발생할 수 있습니다. 해결 방법은 Instant Run을 비활성화하는 것입니다.
Windows 및 Linux :
File -> Settings -> Build, Execution, Deployment -> Instant Run.
맥:
Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run.
이것을 언급 한 @pophus에게 감사합니다.
버터 나이프를 사용하는 경우이 단계를 사용하십시오.
버전 2.2.0 이상에서 새 Jack 컴파일러를 사용하는 경우 'android-apt'플러그인이 필요하지 않으며 대신 컴파일러 종속성을 선언 할 때 apt를 annotationProcessor로 바꿀 수 있습니다.
즉, 제거
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
기본 gradle 파일에서
그리고 제거
apply plugin: 'android-apt'
기본 모듈 파일에서
교체
apt 'com.jakewharton:butterknife-compiler:8.4.0'
와
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
Android Studio 2.2에서이 오류가 발생했습니다. 제 경우에는 AS가 Instant Run 기능의 가용성을 확인했기 때문입니다. Instant Run을 비활성화하여 수정했습니다.
Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run
gradle 버전을 2.2로 변경
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
Windows에서는
File / Settings/ Build, Execution, Deployment / Instant Run.
선택 취소 Enable Instant Run to hot swap code...
단지 가까운 즉시 실행
Windows 파일-설정-빌드, 실행, 배포-즉시 실행.
MAC Android Studio-> Preferences-> Build, Execution, Deployment-> Instant Run.
'developer tip' 카테고리의 다른 글
Moq에서 메서드가 정확히 한 번 호출되었는지 어떻게 확인합니까? (0) | 2020.08.15 |
---|---|
'커밋 날짜'를 표시하도록 'git log'를 구성하는 방법 (0) | 2020.08.15 |
패키지 R이 없습니다. (0) | 2020.08.14 |
SQL Server의 테이블을 참조하는 FOREIGN KEY 제약 조건을 어떻게 알 수 있습니까? (0) | 2020.08.14 |
로그없이 SQL에서 테이블의 대용량 데이터를 삭제하는 방법은 무엇입니까? (0) | 2020.08.14 |