react native compiling an app from github - react-native

Helo everyone, i'm new at react native and react. I'm trying to run a project from github, I keep getting this error. I tried many solutions but still getting it.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-push-notification: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 1m 11s
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
Note: Some input files use or override a deprecated API.
error Command failed with exit code 1.
Taking in consediration that when I start a new project, I can run it without any problem.
Thank you

Related

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$Task Action

I am very new to react native and I am just trying to build to a device. I keep getting a failed project at the point mentioned above the build seems to fail at this point "Execution failed for task ':app:processDebugResources'".
When I look at the build file for the android manifest there is a lot of errors, I have looked online but i cannot find anything. I have checked build.grade folder to ensure that the sdk tools and those numbers match and are installed as well as cleaning the project, rebuilding and syncing the gradle.
Any help would be very much appreciated I am just so new to all of this! below is the full code error message as well as a picture of the errors from the manifest.Picture of the errors in AndroidManifest.xml
BUILD FAILED in 33s
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:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$Task
Action
Android resource linking failed
ERROR:C:\Windows\System32\test\android\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml: A
APT: error: failed to load XML file: The system cannot find the file specified. (2).
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 33s
at makeError (C:\Windows\System32\test\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Windows\System32\test\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Windows\System32\test\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Windows\System32\test\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.

npx react-native run-android does not work. "java.io.IOException: The filename, directory name, or volume label syntax is incorrect"

Just recently ejected expo and I'm trying to run my app on an android device. I followed the instructions (hopefuly right) but I keep getting this error when I try to run my 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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
java.io.IOException: The filename, directory name, or volume label syntax is 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 3s
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
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
java.io.IOException: The filename, directory name, or volume label syntax is 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 3s
at makeError (C:\Users\User\Documents\jad for eject\jad\jad\node_modules\execa\index.js:174:9)
at C:\Users\User\Documents\jad for eject\jad\jad\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (C:\Users\User\Documents\jad for eject\jad\jad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\User\Documents\jad for eject\jad\jad\node_modules\#react-native-community\cli\build\index.js:186:9)
i am just using windows 7 32 bit i am also faced the same problem i solved like
you have local.properties file in your android folder or create one
in that file you have give sdk dir path like
give like this
sdk.dir=C:\\Users\\yourusername\\AppData\\Local\\Android\\Sdk
dont give like
sdk.dir=C:\Users\yourusername\AppData\Local\Android\Sdk
windows does not allow

Task: installdebug not found in the project app

I got this error I can't able to fix that
enter image description here
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
Any one pls help me...

react maps dependency issue

I am working on react native and installing
npm install react-native-maps
But i am getting error in react native cli as mentioned below
What went wrong:
A problem occurred evaluating settings 'reactmaps'.
Could not read script 'E:\react\Projects\reactmaps\reactmaps\node_modules#react-native-community\cli-platform-android\native_modules.gradle' as it does not exist.
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 1s
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.
Where:
Settings file 'E:\react\Projects\android\settings.gradle' line: 2
What went wrong:
A problem occurred evaluating settings 'reactmaps'.
Could not read script 'E:\react\Projects\reactmaps\reactmaps\node_modules#react-native-community\cli-platform-android\native_modules.gradle' as it does not exist.
As i installed react native cli again and again but still getting error. so what is the problem in this

Execution failed for task processDebugResources

when you try to run the command:
react-native run-android
the following error occurs:
> Task :react-native-gesture-handler:compileDebugJavaWithJavac
Note: C:\Users\jefer\Desktop\react\new\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerButtonViewManager.java uses 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.
> Task :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Package 'com.new' from AndroidManifest.xml is not a valid Java package name as 'new' is a Java keyword.
* 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 23s
23 actionable tasks: 21 executed, 2 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
I've tried using:
cd android && gradlew clean
but it did not solve the problem ... I also deleted the android and iOS folders and used the commands:
react-native eject
react-native link
but it did not work.
Problem with your application package name
You set app package name is com.new in AndroifManifest.xml is not a valid package name. Change application package name because new is reserved keyword in java