티스토리 뷰

728x90
반응형
Android Studio 3.1에서 새로운 프로젝트 생성시 Kotlin Support를 활성화한 후 생성하면 다음과 같이 gradle sync가 에러나는 경우가 있다.

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41.
Open File
Show Details


Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41.
Open File
Show Details


Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41.
Open File
Show Details


Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41.
Open File
Show Details


Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41.
Open File
Show Details

그럴때는 다음과 같이 app의 build.gradle에서 jre를 jdk로 수정하면 정상적으로 gradle sync 및 빌드가 된다. 

implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday