react native – Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

react-native에서 android로 프로젝트를 실행하려는데 아래와 같은 오류가 발생했다.

Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

다음 링크를 통해 문제를 해결했다.

https://stackoverflow.com/questions/35000729/android-studio-could-not-initialize-class-org-codehaus-groovy-runtime-invokerhel

react-native로 생성한 프로젝트의 다음 파일을 수정한다.

android/gradle/wrapper/gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip 이 부분과 같이 gradle-6.3 버전으로 설정해주면 된다.

Leave a Reply