react native module init 에러 잡기

Jean Deluge·2021년 5월 26일
0

Error /android

npx create-react-native-library react-native-awesome-module
 
yarn

생성시에 kotlin/swift 설정으로하고 에뮬레이터가 켜져 있는지 확인한다.

yarn example android 

실행하게 되면, 뜨는 에러

  1. What went wrong:
    Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

=> project_root/android/gradle/wrapper/gradle-wrapper.properties 로 접근해서
6.2 버전을 다음과 같이 변경해준다.

distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
  1. What went wrong:
    Could not open settings remapped class cache for 1u30rxuxeh98qfz8wn76zau44
    Could not open settings generic class cache for settings

    먼저 터미널에서 project_root/android 디렉토리에 접근후

    > source ~/.bash_profile //만약 javahome 환경변수 설정을 해주지 않았다면 꼭 해주자
    > gradle wrapper

    실행

profile
node.js , rudyonrails개발자

0개의 댓글