The following error messages are shown after creating a build.
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.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 1m 47s
315 actionable tasks: 314 executed, 1 up-to-date
info Connecting to the development server...
warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
'adb' is not recognized as an internal or external command,
operable program or batch file.
error Failed to start the app.
Error: Command failed: adb shell am start -n com.menpani.laundry_live/com.menpani.laundry_live.MainActivity
at makeError (D:\rith_laundry\node_modules\execa\index.js:174:9)
at Function.module.exports.sync (D:\rith_laundry\node_modules\execa\index.js:338:15)
at tryLaunchAppOnDevice (D:\rith_laundry\node_modules#react-native-community\cli-platform-android\build\commands\runAndroid\tryLaunchAppOnDevice.js:58:22)
at D:\rith_laundry\node_modules#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:104:39
at Array.forEach ()
at runOnAllDevices (D:\rith_laundry\node_modules#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:102:48)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Command.handleAction (D:\rith_laundry\node_modules\react-native\node_modules#react-native-community\cli\build\index.js:186:9)
info Run CLI with --verbose flag for more details.
created the entries in system variables for JDK_HOME and PLATFORM_TOOLS, above displaying errors has been cleared, app start running on phone but still going blank,
i have something different this time, kindly check either its gradle version issue?
Result Displayed as:
Installing APK 'app-debug.apk' on 'Infinix X695 - 11' for app:debug
Installed on 1 device.
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.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 2m 45s
315 actionable tasks: 314 executed, 1 up-to-date
info Connecting to the development server...
info Starting the app on "067682514L109008"...
Starting: Intent { cmp=com.menpani.laundry_live/.MainActivity }
Related
I got this error while react-native run-android. I tried ./gradlew clean ./gradlew -stop and wipe data, remove build folder, .gradle folder etc... But can't solve the problem.
Here is the error code I got.
Does anyone has an idea to solve that problem?
$ react-native run-android
warn Package #svgr/webpack has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in (...)/node_modules/#svgr/webpack/package.json
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1888 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
Starting a Gradle Daemon, 1 incompatible and 3 stopped Daemons could not be reused, use --status for details
> Configure project :lottie-react-native
WARNING:: The specified Android SDK Build Tools version (29.0.3) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2.
Android SDK Build Tools 30.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '29.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Task :app:packageDebug 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.9/userguide/command_line_interface.html#sec:command_line_warnings
495 actionable tasks: 5 executed, 490 up-to-date
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
(...)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key androiddebugkey from store "(...)/android/app/debug.keystore": keystore password was incorrect
* 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 14s
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
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
(...)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key androiddebugkey from store "(...)/android/app/debug.keystore": keystore password was incorrect```
At first was runing node 16.15 with JDK 18. thought it was a problem with the jdk. had to down grade to JDK 11. but still facing this problem. can any one help?
my virtual devices are already runing but for some reason i can
npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-
jetifier" flag.
Jetifier found 964 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
'"adb"' is not recognized as an internal or external command,
operable program or batch file.
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-
avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
> Configure project :app
Unable to detect AGP versions for included builds. All projects in the build should use the
same AGP version. Class name for the included build object:
org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine
if they come from your own scripts or plugins.
See
https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
6 actionable tasks: 6 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by
setting the sdk.dir path in your project's local properties file at
'C:\aldoobi\newaldoobi\android\local.properties'.
* 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 8s
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
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or
by setting the sdk.dir path in your project's local properties file at
'C:\aldoobi\newaldoobi\android\local.properties'.
* 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 8s
at makeError (C:\aldoobi\newaldoobi\node_modules\execa\index.js:174:9)
at C:\aldoobi\newaldoobi\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\aldoobi\newaldoobi\node_modules\#react-native-community\cli-
platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\aldoobi\newaldoobi\node_modules\#react-native-
community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
i have tried changing the path in my computer variables; i have added ANDROID_HOME, JAVA_HOME and also tried to change the android virtual deveces to SDK R but nothing . can any one help?
I try to install react native and Build failed. Why?
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\stefa\Desktop\REACT\better> npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disae it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 12 workers...
info Starting JS server...
info Installing the app...
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.ph accessible: module java.base does not "opens java.io" to unnamed mule #49c3ac54
Try:
Run with --stacktrace option to get the stack trace. Run with --infor --debug option to get more log output. Run with --scan to get fullnsights.
Get more help at https://help.gradle.org
BUILD FAILED in 8s
error Failed to install the app. Make sure you have the Android devepment environment set up: https://reactnative.dev/docs/environment-sup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevrverPort=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.ph accessible: module java.base does not "opens java.io" to unnamed mule #49c3ac54
get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 8s
at makeError (C:\Users\stefa\Desktop\REACT\better\node_modules\execa\index.js:174:9)
at C:\Users\stefa\Desktop\REACT\better\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\stefa\Desktop\REACT\better\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\stefa\Desktop\REACT\better\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
PS C:\Users\stefa\Desktop\REACT\better>
This is most probably due to the JDK being lower than JDK11.
Try Installing JDK11 by opening your project in Android Studio and then following these steps:
Open Settings and go to the Build, deployment.. option and click on the arrow to reveral Build option, click on the Build Option.
Click on the drop down list next to Gradle JDK: under Gradle projects.
Select Download JDK from the list and select Azul and JDK Version 11.
Click OK and wait for it to download and confirm the updated Java/JDK is selected and press Apply followed by OK.
Created a project using npx react-native init AwesomeProject. While running npx react-native run-android in other terminal, I am getting the following error. I tried to follow React Native CLI Quickstart in https://reactnative.dev/docs/environment-setup. I have installed python2, openjdk8, nodejs separately, later deleted them and reinstalled using chocolatey. I have reinstalled AndroidSDK tools, AVD multiple times still getting the same error.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
'C:\Users\Raja' is not recognized as an internal or external command,
operable program or batch file.
info Launching emulator...
'C:\Users\Raja' is not recognized as an internal or external command,
operable program or batch file.
'C:\Users\Raja' is not recognized as an internal or external command,
operable program or batch file.
error Failed to launch emulator. Reason: Could not start emulator within 30 seconds..
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)
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.2/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\Raja Naveen\Desktop\AwesomeProject\android\app\build.gradle' line: 84
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not open dsl remapped class cache for 7f1u5qpw1jm8dwv3ri20amyrz (C:\Users\Raja Naveen\.gradle\caches\6.2\scripts-remapped\react_dysq7qqrljy3c2uubmf33rsun\7f1u5qpw1jm8dwv3ri20amyrz\dslcf39471ad2848fb82befe662c0627ed4).
> 0
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified.
* 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 6m 33s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081```
You need to set the ANDROID_HOME & JAVA_HOME in your environments variables if you are in Windows and in either the bashrc or the zshr if you are using a Mac
JAVA_HOME => C:\Program Files\OpenJDK\openjdk-8u262-b10
ANDROID_HOME => C:\Users\laptopName\AppData\Local\Android\Sdk>
P.S: On Windows just enter env in the search bar and click on the first tab then click on New and add those then you are good to go.
Make sure you have added the android SDK paths in the enivironment varailble"
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
EDIT:
Make sure you have either a running emulator by creating one in Android studio or connected physical devices with USB debugging turned on.
I think
> compileSdkVersion is not specified.
is problem.
Add
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
in build.gradle
I tried to rename my app because I need it but I got the problem after rename it (it works fine before I rename it). I followed this instruction : https://dev.to/abdulbasit313/proper-way-to-rename-a-react-native-project-in-2019-3b98 but when I run, build failed
I'm using react native 0.59.9
This is the error :
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Task :app:preDebugBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.github.yalantis:ucrop:2.2.2-native.
Searched in the following locations:
- file:/C:/Users/ASUS/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/C:/Users/ASUS/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- file:/D:/3-SIMASA/simasamobile/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/D:/3-SIMASA/simasamobile/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
Required by:
project :app > project :react-native-image-crop-picker
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 7s
21 actionable tasks: 20 executed, 1 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
The mentioned solution is not correct because it'll clear your linked libraries... You can easily rename the android project by changing name in android/src/main/res/values/strings.xml. Also on iOS, you can change the name by opening ios/your_project.xcodeproj in Xcode and modify Display Name in the General tab of your project settings.
Please install and relink the library again. This will resolve the issue.
react-native-image-crop-picker
Also please refer here to how to rename project in easier way.