본문 바로가기
Android/Build Error

[안드로이드] build.gralde dependencies implementation 사용 에러

by Jay Son 아기 냥이 해린 짱💖 2021. 9. 3.

Android Gradle 플러그인 3.0.0부터 지원 중단된 compile 옵션을 -> implementation 변경 후 GradleScriptException 빌드 에러 발생

 

build.gralde(app)

dependencies {
    implementation "com.android.support:support-v4:26.1.0"
    implementation "com.android.support:gridlayout-v7:26.1.0"
    implementation "com.android.support:cardview-v7:26.1.0"
    implementation "com.android.support:appcompat-v7:26.1.0"
}

Build file 'D:\04.Git\sample\SampleCode\BluetoothChat\Application\build.gradle' line: 22

A problem occurred evaluating project ':Application'.
> Could not find method implementation() for arguments [com.android.support:support-v4:26.1.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':Application'.
	...
	... 102 more

 

해결 방법

build.gradle(Project)에 gradle classpath 설정 후 Sync Now

 

GradleScriptException 빌드 에러는 다른 원인으로 발생 될 수 있습니다. 

위와 같이 build.gradle 파일에 gradle 선언 후에도 해결 되지 않을 경우 다른 원인을 찾아야 합니다.

반응형