반응형
실제 에러메시지
위의 메세지를 텍스트로 복사
smilerush@SmileRushui-MacBookPro Example1ReactNative % npm run android
> example1reactnative@0.0.1 android
> react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 10 workers...
info JS server already running.
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
Starting a Gradle Daemon, 1 incompatible and 7 stopped Daemons could not be reused, use --status for details
> Task :app:processDebugMainManifest FAILED
11 actionable tasks: 11 executed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @f21af7c
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @f21af7c
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
이런 에러가 발생했다.
해결하기!
1. Android Studio에서 Project 탐색기를 열어준다.
2. Android/Gradle Scripts/build.gradle (Project: 프로젝트명) 파일을 열어준다.
3. 아래의 값으로 수정한다.
buildscript {
ext {
...그대로
}
repositories {
...그대로
}
dependencies {
classpath('com.android.tools.build:gradle:7.1.1')
// 이 부분 classpath를 위의 값으로 바꾸어주니 정상작동되었다!
}
}
... 그대로
반응형
'React-Native 오류들' 카테고리의 다른 글
Node server is running and available on the same network - run 'npm start' from react-native root (0) | 2022.02.23 |
---|---|
M1 맥북 : cocoapods 에러 (pod install이 안될 때) (0) | 2022.02.20 |
댓글