작성
·
3.8K
0
안녕하세요 제로초님
react natve image crop picker 패키지 설치 후
npm run android로 빌드 과정에서
Execution failed for task ':react-native-image-crop-picker:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details.
이런 에러가 떴습니다.
그래서
react natve image crop picker 깃헙(https://github.com/ivpusic/react-native-image-crop-picker#android-1)
의 READ.md에 써있는 step3을 따라해봤습니다.
build.gradle과 android/app/build.gradle에 코드를 추가했지만
java.lang.stackoverflowerror (no error message)
에러가 뜨며 고쳐지지 않았습니다.
그래서 제로초님과 버젼을 맞추기 위해
ch4의 package.json, android/build.gradle, android/app/build.gradle이 3가지 파일의 코드를 복사해 제 프로젝트에 붙여넣은 후
npm install --force하였습니다.
하지만 빌드 과정 중 아래 에러가 떴습니다.
Execution failed for task ':app:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.
해본시도
cd android 후 ./graldew clean
안드로이드 스튜디오에서 Invalidate Caches 후Restart
모두 해결되지 않고 똑같은 에러(바로 위의 에러)가 떴습니다.
버젼을 맞추는 과정에서 package.json만 가져온후 npm install한게 문제인지 잘 모르겠습니다.
이 방식이 잘못된건가요? 아니면 에러를 해결하는 다른 방법이 있는건가요?
아래 자세한 에러 코드 넣었습니다.
감사합니다.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:22: error: cannot find symbol
import com.facebook.react.ReactInstanceEventListener;
^
symbol: class ReactInstanceEventListener
location: package com.facebook.react
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainActivity.java:39: error: cannot find symbol
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainActivity.java:43: error: method does not override or implement a method from a supertype
@Override
^
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainActivity.java:47: error: cannot find symbol
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainApplication.java:45: error: cannot
find symbol
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainApplication.java:45: error: illegal parenthesized expression
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainApplication.java:56: error: cannot
find symbol
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\newarchitecture\MainApplicationReactNativeHost.java:108: error: cannot find symbol
ReactNativeConfig.DEFAULT_CONFIG,
^
symbol: variable DEFAULT_CONFIG
location: interface ReactNativeConfig
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:55: error: cannot find symbol
new ReactInstanceEventListener() {
^
symbol: class ReactInstanceEventListener
location: class ReactNativeFlipper
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:56: error: method does not override or implement a method from a supertype
@Override
^
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:58: error: incompatible types: <anonymous ReactInstanceEventListener> cannot be converted to ReactInstanceEventListener
reactInstanceManager.removeReactInstanceEventListener(this);
^
Note: C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java uses or
overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
11 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.
* 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 4m 36s
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.bat app:installDebug -PreactNativeDevServerPort=8081
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: ����ġ ���� ���(URI: "", ����: "base-extension")�Դϴ�. �ʿ��� ��Ҵ� <{}codename>,<{}layoutlib>,<{}api-level>�Դϴ�.Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: ����ġ ���� ���(URI: "", ����: "base-extension")�Դϴ�. �ʿ��� ��Ҵ� <{}codename>,<{}layoutlib>,<{}api-level>�Դϴ�.Note: C:\Users\user\FoodDeliveryApp\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStorageModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\user\FoodDeliveryApp\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStoragePackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\Users\user\FoodDeliveryApp\node_modules\@react-native-community\geolocation\android\src\main\java\com\reactnativecommunity\geolocation\GeolocationModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\user\FoodDeliveryApp\node_modules\@react-native-firebase\analytics\android\src\main\java\io\invertase\firebase\analytics\UniversalFirebaseAnalyticsModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\user\FoodDeliveryApp\node_modules\@react-native-firebase\messaging\android\src\main\java\io\invertase\firebase\messaging\ReactNativeFirebaseMessagingModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\user\FoodDeliveryApp\node_modules\react-native-push-notification\android\src\main\java\com\dieam\reactnativepushnotification\modules\RNPushNotification.java uses
unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:22: error: cannot find symbol
import com.facebook.react.ReactInstanceEventListener;
^
symbol: class ReactInstanceEventListener
location: package com.facebook.react
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainActivity.java:39: error: cannot find symbol
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainActivity.java:43: error: method does not override or implement a method from a supertype
@Override
^
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainActivity.java:47: error: cannot find symbol
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainApplication.java:45: error: cannot
find symbol
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainApplication.java:45: error: illegal parenthesized expression
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\MainApplication.java:56: error: cannot
find symbol
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable IS_NEW_ARCHITECTURE_ENABLED
location: class BuildConfig
C:\Users\user\FoodDeliveryApp\android\app\src\main\java\com\km\fooddeliveryapp\newarchitecture\MainApplicationReactNativeHost.java:108: error: cannot find symbol
ReactNativeConfig.DEFAULT_CONFIG,
^
symbol: variable DEFAULT_CONFIG
location: interface ReactNativeConfig
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:55: error: cannot find symbol
new ReactInstanceEventListener() {
^
symbol: class ReactInstanceEventListener
location: class ReactNativeFlipper
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:56: error: method does not override or implement a method from a supertype
@Override
^
C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java:58: error: incompatible types: <anonymous ReactInstanceEventListener> cannot be converted to ReactInstanceEventListener
reactInstanceManager.removeReactInstanceEventListener(this);
^
Note: C:\Users\user\FoodDeliveryApp\android\app\src\debug\java\com\km\fooddeliveryapp\ReactNativeFlipper.java uses or
overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
11 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.
* 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 4m 36s
at makeError (C:\Users\user\FoodDeliveryApp\node_modules\execa\index.js:174:9)
at C:\Users\user\FoodDeliveryApp\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\user\FoodDeliveryApp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\user\FoodDeliveryApp\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
답변 1
0
picker:compileDebugJavaWithJavac
이건 자바쪽 코드 에러이고요. 라이브러리 코드 자체에 버그가 있는 겁니다.
https://github.com/ivpusic/react-native-image-crop-picker/issues/1098
검색해보시면 이 이슈가 나옵니다. 이걸 검색하실 수 있어야 합니다.
0.38로 버전을 낮추라고 하네요.
감사합니다!!