React Native - 0. 설치 오류

CodeModel·2024년 8월 21일
0

ReactNative

목록 보기
1/1

리액트 네이티브가 집에서는 잘 동작 하였는데 다른 컴퓨터에서는

npx react-native run-android

명령어를 실행했을 때

could not determine the dependencies of task ':app:compiledebugjavawithjavac'. > cannot query the value of this provider because it has no value available.

오류가 나면서 실행이 계속 안되었다

.gradle 폴더도 삭제해보고

gradle cache도 초기화해보고

sdk도 다시 설치하고

별걸 다 해보았는데도 해결이 안되었다 그러나 결국 해결하였는데

  1. 내 안드로이드 sdk는 Android API 35 였다
  2. 그런데 React Native의 build.gradle에 최대 버전에는 34가 적혀있었다
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.24"
    }
  1. 그래서 34를 35로 바꾸었더니 해결 되었다!!!
    ext {
        buildToolsVersion = "35.0.0"
        minSdkVersion = 23
        compileSdkVersion = 35
        targetSdkVersion = 35
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.24"
    }

구글링해도 별로 나오지도 않고 해서 3시간동안 헤매다가 겨우 해결했다..

profile
개발자가 되기 위한 일기

0개의 댓글