Error:Execution failed for task 'app:generateDebugBuildConfig'
java.io.FileNotFoundException: C:\Users\bok\Desktop\Zipzap\app\build\generated\source\buildConfig\debug\com\storie\myapp \BuildConfig.java (Le chemin d'accès spécifié est introuvable)
What's the solution..
I hope to find a solution to this problem
Try to clean project this is working for me
for android
$ cd android
$ ./gradlew clean
BUILD SUCCESSFUL in 5s
1 actionable task: 1 executed
Try to clean and rebuild project or you can try to remove whole build folder and build after removing. If it won't help, show your build.gradle, your current information isn't enough to recognise the reason of problem.
Changing port worked for me
You Could try:
react-native run-android --port=8082
React Native
Faced similar issue while building react native app. Running on the different port as the default port (8081) is used by some other app.
Command to build the app.
react-native run-android --port=8082
Solution
Removed extra attribute android:screenOrientation="portrait"
. If you check the log, it says
lineNumber: 26; columnNumber: 56; Attribute "screenOrientation" bound to namespace " http://schemas.android.com/apk/res/android " was already specified for element "activity".
hence removed the same attribute. This was being added multiple times
Error log
Configure project :react-native-webview
:react-native-webview:reactNativeAndroidRoot /Users/PROJECT_PATH/node_modules/react-native/android
Task :app:generateDebugBuildConfig FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
org.xml.sax.SAXParseException; systemId: file:/Users/PROJECT_PATH/android/app/src/main/AndroidManifest.xml; lineNumber: 26; columnNumber: 56; Attribute "screenOrientation" bound to namespace "http://schemas.android.com/apk/res/android" was already specified for element "activity".
* 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
32 actionable tasks: 1 executed, 31 up-to-date
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
Command failed: ./gradlew installDebug
cd android
.\\gradlew clean
( ./gradlew clean
didnot work for me for some reason.) cd ..
npx react-native run-android
In android studio,
build
clean project
and wait for project to cleanbuild
-> rebuild project
and wait for project to rebuild.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.