HarishJangra / react-native-easy-starter

A react-native starter kit using RN0.63, Flipper support, LogBox, AndroidX, Hooks workflow, easy-peasy, code-push, Themes support and much more
MIT License
257 stars 92 forks source link

Task :react-native-screens:compileReleaseJavaWithJavac FAILED #38

Open frusty84 opened 3 years ago

frusty84 commented 3 years ago

Hello. Hope someone can help me. I have problems launching the apk. I have tried to solve it with some solution that is detailed here but I have not achieved anything. I have done gradle clean and neither. Thanks.

C:\Users\AGUS\Desktop\workreap-app>react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets -dest android/app/src/main/res warn The following packages use deprecated "rnpm" config that will stop working from next release:

C:\Users\AGUS\Desktop\workreap-app>react-native run-android --variant=release warn The following packages use deprecated "rnpm" config that will stop working from next release:

Task :@react-native-community_toolbar-android:compileReleaseJavaWithJavac

Task :react-native-background-downloader:compileReleaseJavaWithJavac

Task :react-native-gesture-handler:compileReleaseJavaWithJavac

Task :react-native-image-crop-picker:compileReleaseJavaWithJavac

Task :react-native-maps:compileReleaseJavaWithJavac

Task :react-native-reanimated:compileReleaseJavaWithJavac

Task :react-native-screens:compileReleaseJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings 180 actionable tasks: 180 executed Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\toolbar-android\android\src\main\java\com\reactnativecommunity\toolbarandroid\ReactToolbar.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-background-downloader\android\src\main\java\com\eko\RNBackgroundDownloaderModule.java uses unchecked or unsafe ope rations. Note: Recompile with -Xlint:unchecked for details. Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerButtonViewManager.java us es or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use 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. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-reanimated\android\src\main\java\com\swmansion\reanimated\NodesManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:26: error: cannot find symbol import com.facebook.react.views.text.ReactTypefaceUtils; ^ symbol: class ReactTypefaceUtils location: package com.facebook.react.views.text C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:247: error: cannot find symbol Typeface titleTypeface = ReactTypefaceUtils.applyStyles( ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:377: error: cannot find symbol mTitleFontWeight = ReactTypefaceUtils.parseFontWeight(fontWeightString); ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors

FAILURE: Build failed with an exception.

BUILD FAILED in 1m 42s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development -environment. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installRelease -PreactNativeDevServerPort=8081 Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\toolbar-android\android\src\main\java\com\reactnativecommunity\toolbarandroid\ReactToolbar.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-background-downloader\android\src\main\java\com\eko\RNBackgroundDownloaderModule.java uses unchecked or unsafe ope rations. Note: Recompile with -Xlint:unchecked for details. Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerButtonViewManager.java us es or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use 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. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-reanimated\android\src\main\java\com\swmansion\reanimated\NodesManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:26: error: cannot find symbol import com.facebook.react.views.text.ReactTypefaceUtils; ^ symbol: class ReactTypefaceUtils location: package com.facebook.react.views.text C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:247: error: cannot find symbol Typeface titleTypeface = ReactTypefaceUtils.applyStyles( ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:377: error: cannot find symbol mTitleFontWeight = ReactTypefaceUtils.parseFontWeight(fontWeightString); ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors

FAILURE: Build failed with an exception.

BUILD FAILED in 1m 42s

at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:15)
at runOnAllDevices (C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)

C:\Users\AGUS\Desktop\workreap-app>react-native run-android --variant=release warn The following packages use deprecated "rnpm" config that will stop working from next release:

Task :react-native-screens:compileReleaseJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings 179 actionable tasks: 2 executed, 177 up-to-date C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:26: error: cannot find symbol import com.facebook.react.views.text.ReactTypefaceUtils; ^ symbol: class ReactTypefaceUtils location: package com.facebook.react.views.text C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:247: error: cannot find symbol Typeface titleTypeface = ReactTypefaceUtils.applyStyles( ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:377: error: cannot find symbol mTitleFontWeight = ReactTypefaceUtils.parseFontWeight(fontWeightString); ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors

FAILURE: Build failed with an exception.

BUILD FAILED in 24s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development -environment. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installRelease -PreactNativeDevServerPort=8081 C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:26: error: cannot find symbol import com.facebook.react.views.text.ReactTypefaceUtils; ^ symbol: class ReactTypefaceUtils location: package com.facebook.react.views.text C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:247: error: cannot find symbol Typeface titleTypeface = ReactTypefaceUtils.applyStyles( ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig C:\Users\AGUS\Desktop\workreap-app\node_modules\react-native-screens\android\src\main\java\com\swmansion\rnscreens\ScreenStackHeaderConfig.java:377: error: cannot find symbol mTitleFontWeight = ReactTypefaceUtils.parseFontWeight(fontWeightString); ^ symbol: variable ReactTypefaceUtils location: class ScreenStackHeaderConfig Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors

FAILURE: Build failed with an exception.

BUILD FAILED in 24s

at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:15)
at runOnAllDevices (C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (C:\Users\AGUS\Desktop\workreap-app\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)

C:\Users\AGUS\Desktop\workreap-app>npm -v 7.10.0

C:\Users\AGUS\Desktop\workreap-app>react-native -v react-native-cli: 2.0.1 react-native: 0.60.5

C:\Users\AGUS\Desktop\workreap-app>gradle -v


Gradle 7.0

Build time: 2021-04-09 22:27:31 UTC Revision: d5661e3f0e07a8caff705f1badf79fb5df8022c4

Kotlin: 1.4.31 Groovy: 3.0.7 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 1.8.0-282 (Oracle Corporation 25.71-b08) OS: Windows 10 10.0 amd64

mayank-budhiraja commented 3 years ago

Hello @frusty84 - Add keys to the gradle.properties