Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30347

Building React Native app fails: Task :app:generateDebugBuildConfig FAILED

$
0
0

I am trying to run an app on an Android emulator. I followed the instructions in the React Native docs for installing Android Studio and setting the environment variables. I can create a default project with '''npx react-native init''' and run it without problems, so I guess my installation is fine. I cloned the repository, "npm installed" and got the following errors, trying to build fails as well. Since I am completely new to React Native and did not participate on this project so far I am clueless on how to approach this.

PS C:\Users\PP\pp-app> npm installnpm WARN aws-amplify-react-native@2.2.3 requires a peer of graphql@0.13.0 but none is installed. You must install peer dependencies yourself.npm WARN aws-amplify-react-native@2.2.3 requires a peer of react-native-fs@^2.12.1 but none is installed. You must install peer dependencies yourself.npm WARN aws-amplify-react-native@2.2.3 requires a peer of react-native-sound@^0.10.9 but none is installed. You must install peer dependencies yourself.npm WARN aws-amplify-react-native@2.2.3 requires a peer of react-native-voice@^0.2.6 but none is installed. You must install peer dependencies yourself.npm WARN eslint-plugin-react@7.12.4 requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.npm WARN eslint-plugin-react-native@3.6.0 requires a peer of eslint@^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.npm WARN react-native-elements@0.19.1 requires a peer of react-native-vector-icons@^4.2.0 but none is installed. You must install peer dependencies yourself.npm WARN react-native-qrcode-scanner@1.2.3 requires a peer of react-native-camera@^1.0.2 but none is installed. You must install peer dependencies yourself.audited 953593 packages in 10.847sfound 40843 vulnerabilities (39913 low, 930 moderate)  run `npm audit fix` to fix them, or `npm audit` for details
PS C:\Users\PP\pp-app> npx react-native run-androiderror React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:  - amazon-cognito-identity-js (to unlink run: "react-native unlink amazon-cognito-identity-js")  - react-native-camera (to unlink run: "react-native unlink react-native-camera")  - react-native-linear-gradient (to unlink run: "react-native unlink react-native-linear-gradient")  - react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")  - react-native-webview (to unlink run: "react-native unlink react-native-webview")This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.mdinfo Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.Jetifier found 1054 file(s) to forward-jetify. Using 8 workers...info Starting JS server...info Installing the app...Downloading https://services.gradle.org/distributions/gradle-4.10.1-all.zip...............................................................................................................Welcome to Gradle 4.10.1!Here are the highlights of this release: - Incremental Java compilation by default - Periodic Gradle caches cleanup - Gradle Kotlin DSL 1.0-RC6 - Nested included builds - SNAPSHOT plugin versions in the `plugins {}` blockFor more details see https://docs.gradle.org/4.10.1/release-notes.htmlStarting a Gradle Daemon (subsequent builds will be faster)> Configure project :react-native-auth0WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.It will be removed at the end of 2019.For more information, see https://d.android.com/r/tools/task-configuration-avoidance.To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.> Transform okhttp-urlconnection.jar (com.squareup.okhttp3:okhttp-urlconnection:3.12.1) with JetifyTransformERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}'ERROR: [TAG] Failed to resolve variable '${project.groupId}'ERROR: [TAG] Failed to resolve variable '${project.version}'ERROR: [TAG] Failed to resolve variable '${project.groupId}'ERROR: [TAG] Failed to resolve variable '${project.version}'ERROR: [TAG] Failed to resolve variable '${project.groupId}'ERROR: [TAG] Failed to resolve variable '${project.version}'ERROR: [TAG] Failed to resolve variable '${project.groupId}'ERROR: [TAG] Failed to resolve variable '${project.version}'> Task :@react-native-community_async-storage:compileDebugJavaWithJavac> Task :amazon-cognito-identity-js:compileDebugJavaWithJavac> Task :app:generateDebugBuildConfig FAILED66 actionable tasks: 56 executed, 10 up-to-datewarning: [options] source value 7 is obsolete and will be removed in a future releasewarning: [options] target value 7 is obsolete and will be removed in a future releasewarning: [options] To suppress warnings about obsolete options, use -Xlint:-options. 3 warningswarning: [options] source value 7 is obsolete and will be removed in a future releasewarning: [options] target value 7 is obsolete and will be removed in a future releasewarning: [options] To suppress warnings about obsolete options, use -Xlint:-options. 3 warningsFAILURE: Build failed with an exception.* What went wrong:java.io.IOException: Unable to delete directory C:\Users\PP\pp-app\android\app\build\generated\source\buildConfig\debug\com.> Unable to delete directory C:\Users\PP\pp-app\android\app\build\generated\source\buildConfig\debug\com.* 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.orgBUILD FAILED in 2m 33serror 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=8081warning: [options] source value 7 is obsolete and will be removed in a future releasewarning: [options] target value 7 is obsolete and will be removed in a future releasewarning: [options] To suppress warnings about obsolete options, use -Xlint:-options.warning: [options] source value 7 is obsolete and will be removed in a future releasewarning: [options] target value 7 is obsolete and will be removed in a future releasewarning: [options] To suppress warnings about obsolete options, use -Xlint:-options.3 warningsFAILURE: Build failed with an exception.* What went wrong:java.io.IOException: Unable to delete directory C:\Users\PP\pp-app\android\app\build\generated\source\buildConfig\debug\com.> Unable to delete directory C:\Users\PP\pp-app\android\app\build\generated\source\buildConfig\debug\com.* 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.orgBUILD FAILED in 2m 33s    at checkExecSyncError (child_process.js:629:11)    at execFileSync (child_process.js:647:13)    at runOnAllDevices (C:\Users\PP\pp-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)    at buildAndRun (C:\Users\PP\pp-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)    at then.result (C:\Users\PP\pp-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)    at process._tickCallback (internal/process/next_tick.js:68:7)

Viewing all articles
Browse latest Browse all 30347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>