I am Getting following errors anyone can help me pertains to the React Native Project - react-native

FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.facebook.react:react-native:+.
Failed to list versions for com.facebook.react:react-native.

Try clean gradlew with command:
./gradlew clean

Related

React-native package Release error while ./gradlew assembleRelease

Task :app:packageRelease FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:packageRelease'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
java.io.IOException: Execution of compression failed.
Try cleaning the project using ./gradlew clean and rebuilding the project...
If doesn't work then, show the error log in details...

ReNative, Android Error - the path for SDK directory is like linked twice, cannot build, don't know why

I have created my first React Native (Android Wear OS) project and I cannot build it.
I don't understand why the path is linked twice. Can someone help me, please?
rnv run -p androidwear - ERRROR! COMMAND:
gradlew.bat assembleDebug -x bundleReleaseJsAndAssets
FAILED with ERROR:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
The SDK directory 'C:\Users\Dado\Desktop\mojaprva\platformBuilds\helloWorld_androidwear\Users\Dado\AppData\Local\Android\sdk' does not exist.

Project with path '../node_modules/react-native-code-push/android' could not be found in project ':app'

After updating react-native version 0.60.3 to 0.60.4, I am not able to build apk every time run the "react-native run-android" command an error message appears
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Front_End\android\app\build.gradle' line: 161
* What went wrong:
A problem occurred evaluating project ':app'.
> Project with path '../node_modules/react-native-code-push/android'
could not be found in project ':app'.
I have checked inside node_modules this module is present.

react-native-maps:processReleaseResources task gradlew build failed

I check already all similar answers from Stack and also I lookup on GitHub Issues but without any luck.
Problem occur when I install react-native-maps plugin, during a build I receive gradlew exception
:react-native-maps:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-maps:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
Google Maps API is correctly added into AndroidManifest file.
One additional remark I see also many warnings like
...\node_modules\react-native-maps\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.8.0\res\drawable\common_google_signin_btn_text_light_focused.xml:14:29-81 : No resource found that matches the given name (at 'drawable' with value '#drawable/common_google_signin_btn_text_light_normal').
However in build.gradle I add dependencies for
compile 'com.google.android.gms:play-services-base:10.0.1'
Any ideas how to resolve a problem?
I had the same error recently and should have paid more attention to the error message. Message clearly states it out. Failure to execute aapt
Short Answer:
Make aapt executable
Slightly Longer Answer:
1) Run cd android && ./gradlew clean && ./gradlew assembleDebug --stacktrace. The output will show the build-tool version where you will locate the right aapt to make executable and the path to it. e.g Cannot run program "/home/user/Android/Sdk/build-tools/25.0.3/aapt" (in directory "/home/user/testproject/node_modules/react-native-maps/lib/android"): error=13, Permission denied
2) Right click on file 'aapt', click on permissions, click the checkbox marked 'Execute'
3) Run ./gradlew clean && ./gradlew assembleDebug again and you should be good to go!!!
Problem solved.
An issue is a to long file path and npm not properly install react-native-maps module (there wasn't all required resource files).
During "compilation"
react-native run-android
gradlew task fails du to missing resources in maps module
I experienced a similar issue with this error response:
:react-native-maps:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-maps:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
The way I was able to resolve this error was by going into folder node_modules/react-native-maps/lib/android and editing the build.gradle file with the corresponding compileSdkVersion, buildToolsVersion, minSdkVersion, and targetSdkVersion from my {root}/android/app level build.gradle versions.
This fix worked in various other newly installed packages which caused an error upon attempting to react-native run-android. Hope this helps!

React-Native Android Gradlew installDebug results in build failure

I am running a React-Native app but when I try to gradlew installDebug in the android directory I get a build failure. Here is the info I get when I use:
gradlew installDebug --info
`BUILD FAILED
Total time: 1.118 secs
Stopped 0 compiler daemon(s).
Received result CommandFailure[value=org.gradle.launcher.exec.ReportedException: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring project ':app'.] from daemon DaemonInfo{pid=4326, address=[4c8a3b8f-5957-4911-b262-0e36824d2139 port:54258, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=dbec8c34-89ba-4872-9077-12b4b3ff38a0,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home,daemonRegistryDir=/Users/d0ntg0m0ng/.gradle/daemon,pid=4326,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}.`
This is the error I get when I run gradlew installDebug without --info
`android [router] :> ./gradlew installDebug
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Cannot evaluate module react-native-couchbase-lite : Configuration with name 'default' not found.`
"react-native": "^0.15.0", is the version of react-native I am using.
this is the repo that the project is fork from
I am trying to setup the app to my genymotion emulator but the build never finishes.
I have already run the commands to react-native start and set up the sync to the couchbase lite server. Not sure if this is relevant info. I am fairly new to native development and I have no idea where to start with trying to debug this.
include ':app'
include ':react-native-couchbase-lite'
project(':react-native-couchbase-lite').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-couchbase-lite/android')
check the file path