I got problem because of android enviroment - android

When I tried to
react-native run-android
I get this error. I don't understand why?? Everything was working fine. I installed all android environment variables
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:7516) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Jetifier found 1367 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
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\furkan\FirstProject\FirstProject\node_modules\react-native-navigation\lib\android\app\build.gradle' line: 4
* What went wrong:
A problem occurred evaluating project ':react-native-navigation'.
> Plugin with id 'kotlin-android' not found.
* 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 ':react-native-navigation'.
> 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 7s
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

Related

React Native v0.68 - A problem occurred configuring project ':react-native-async-storage_async-storage'

I had tried everything mentioned in same error question asked earlier but it didn't worked for me.
Please help what is the problem here ?
Thankyou
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flagdid.
Jetifier found 1058 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
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:
A problem occurred configuring project ':react-native-async-storage_async-storage'.
Could not load compiled classes for build file 'D:\aditya\pplwork\1-aditya-training\react-native\rn-igclone\node_modules#react-native-async-storage\async-storage\android\build.gradle' from cache.
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 26s
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:
A problem occurred configuring project ':react-native-async-storage_async-storage'.
Could not load compiled classes for build file 'D:\aditya\pplwork\1-aditya-training\react-native\rn-igclone\node_modules#react-native-async-storage\async-storage\android\build.gradle' from cache.
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 26s
at makeError (D:\aditya\pplwork\1-aditya-training\react-native\rn-igclone\node_modules\execa\index.js:174:9)
at D:\aditya\pplwork\1-aditya-training\react-native\rn-igclone\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\aditya\pplwork\1-aditya-training\react-native\rn-igclone\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\aditya\pplwork\1-aditya-training\react-native\rn-igclone\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Could not find method compile() for arguments project react-native-google-places

FAILURE: Build failed with an exception.
Where:
Build file '/home/jhondev/Android/myapp/android/app/build.gradle' line: 158
What went wrong:
A problem occurred evaluating project ':app'.
Could not find method compile() for arguments [project ':react-native-google-places'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
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 app:installDebug. Run CLI with --verbose flag for more details.

Trying to run react-native on real device but error occurred with installDebug

I am trying ro run react native on my android phone but this error occured . I have used react-native-cli.And i have not yet changed the code of the react-native provide.Please help . Thanks in advance
error is here =>
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...
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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
What went wrong:
Task 'installDebug' not found in project ':app'.
Try:
Run gradlew tasks to get a list of available tasks. 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 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Task 'installDebug' not found in project ':app'.
Try:
Run gradlew tasks to get a list of available tasks. 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 3s
at makeError (C:\Users\Buntu\Documents\projects\Contactapp\node_modules\execa\index.js:174:9)
at C:\Users\Buntu\Documents\projects\Contactapp\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (C:\Users\Buntu\Documents\projects\Contactapp\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\Buntu\Documents\projects\Contactapp\node_modules\#react-native-community\cli\build\index.js:186:9)
C:\Users\Buntu\Documents\projects\Contactapp>

React Native CLI failed to determine Android project configuration

I'm trying to build my android project but I'm facing a configuration error.
Previously I built an app bundle, but after that, I'm receiving the following error.
I already deleted node_nodules and tried "yarn install" but the error persist.
D:\ReactNative\Mapin\android>gradlew assembleRelease
Starting a Gradle Daemon, 10 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Script 'D:\ReactNative\Mapin\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 206
* What went wrong:
A problem occurred evaluating script.
> React Native CLI failed to determine Android project configuration. This is likely due to misconfiguration. Config output:
[root:D:\ReactNative\Mapin\android, reactNativePath:D:\ReactNative\Mapin\node_modules\react-native, dependencies:[:], commands:[], assets:[], platforms:[:], haste:[providesModuleNodeModules:[], platforms:[]], project:[:]]
* 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 15s
Fixed follow the following:
yarn add #react-native-community/cli-platform-android#3.0.3
yarn add react-native#0.61.5
Removed "--quiet" from npx.cmd in native_modules.gradle
cd android && gradlew clean
native_modules.gradle can be found in:
${PROJECT_FOLDER}/node_modules/#react-native-community/cli-platform-android/native_modules.gradle

ReactNative error: Execution failed for task ':react-native-reanimated:checkDebugManifest'

I started to work on a react native project. But I have a problem now. I built a simple project and execute react-native run-android. But error occurred.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 954 file(s) to forward-jetify. Using 6 workers...
info Starting JS server...
info Installing the app...
> Task :app:createDebugCompatibleScreenManifests FAILED
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.5/userguide/command_line_interface.html#sec:command_line_warnings
40 actionable tasks: 12 executed, 28 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createDebugCompatibleScreenManifests'.
> Failed to create directory 'E:\web_project\fcManager\app\svn_prj\02_source\fcmanager\android\app\build\intermediates\compatible_screen_manifest\debug\createDebugCompatibleScreenManifests\out'
* 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 7s
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:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createDebugCompatibleScreenManifests'.
> Failed to create directory 'E:\web_project\fcManager\app\svn_prj\02_source\fcmanager\android\app\build\intermediates\compatible_screen_manifest\debug\createDebugCompatibleScreenManifests\out'
* 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
And then I cleared the cache by yarn start --reset-cache, and execute again react-native run-android. Error again. But the latter errors are different from the former errors.
What could be a problem?
Wow. I solve the problem.
>cd android
android>./gradlew clean
And then apk is successfully installed on the emulator.

Categories

Resources