React Native Drawer Navigation Reanimated Problem - android

I try to use drawer navigator on react native, first i have installed all necessary packages and i am using reanimated-1 but app can not be built and gives this error. If i try to use reanimated-2 everything is fine but while i am using reanimaed-1 i am getting this error.
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.
Where:
Build file 'C:\Users\fikre\Desktop\reactnative\drawerNavDemo\node_modules\react-native-reanimated\android\build.gradle' line: 64
What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
Configuration with name 'compile' not found.

Related

React Native suddenly throwing May 09 2022

I am currently working on a React Native project that has been previously worked on by other devs. it was compiling fine as before May 09 2022 then I tried to compile it now and it's now throwing
BUILD FAILED in 41s
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:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.facebook.android:facebook-android-sdk:9.0.+.
Required by:
project :app > project :react-native-fbsdk-next
> Failed to list versions for com.facebook.android:facebook-android-sdk.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml.
> Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml'.
> org.apache.http.client.ClientProtocolException (no error message)
No new packages were added, I even tried to revert to old commits just to confirm if it's package related and it still threw this error. Was there any changes or update with Maven recently? I have other devs that are on Mac and theirs seem to be compiling just fine
I am not an expert in react native, I only started using it and I also have the same issue from 9th may 2022. But I am able to fixed it.
You can follow the below steps and may be it will work for you too.
Open this file node_modules/react-native-fbsdk-next/android/build.gradle and change Line no 48 with below line
def FACEBOOK_SDK_VERSION = safeExtGet('facebookSdkVersion', '9.0.0')

Failed to install the app in android emulator in React Native

I'm trying to run my react native CLI app in an android emulator but it getting errors to install in the emulator.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
E:\Program Files\React Native CLI\testDemo\android\CLI\testDemo\node_modules\react-native-image-crop-picker\android\build\intermediates\library_manifest\debug\AndroidManifest.xml:10:5-14:15: AAPT: error: unexpected element <queries> found in <manifest>.
And already installed this dependency react-native-image-crop-picker in react native, I have perfectly set up the environment variables which are mentioned by Facebook. And this error is showing up
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
Manifest File has no error you see it
Kindly please what should I do to resolve this issue.
Acording to here its look like known issue.Try to upgrade gradle and rebuild.
buildscript
{
...
dependencies {
// classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.0.1'
}
...
}

React Native: Task :app:installDebug FAILED

I am working on MAC, trying to run React Native on android but it throws this error: Task :app:installDebug FAILED. This is the full error:
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
27 actionable tasks: 2 executed, 25 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8088
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.
I've tried reinstalling Android Studio twice as well as creating a new project for RN but that didn't help me out.
I tried this as well: brew cask install android-platform-tools. Thanks.
You need to install adbExe. Please follow steps in this link

Unable to create build ionic3 using command ionic build android

I set an environment path for JAVA_HOME and followed
android studio Error:Unable to start the daemon process.
I'm still getting an error, not able to create build. I am using latest version of node, npm, ionic.
Error:
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_11
studio
Subproject Path: CordovaLib
Subproject Path: app
[12:02:18] lint finished in 9.73 s
[Fatal Error] gradle-bintray-plugin-1.7.3.pom:2:1: Content is not allowed
log.
[Fatal Error] android-maven-gradle-plugin-1.5.pom:2:1: Content is not all
prolog.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
Did you upgrade your cordova? After updating it might be run. Or you can remove nodemodule folder and then do npm install and then try to build your app.

Android Build failed after adding Crosswalk to Ionic

Got excited about Ionic adding Crosswalk and now my project won't build. The project was compiling and working before updating and adding Crosswalk. Anyone have any suggestions on how I can correct the error below? I prefer not to rollback. Thank goodness for version control :)
System information:
OS: Windows 8
Node Version: v0.10.32
Cordova CLI: 4.2.0
Ionic Version: 1.0.0-beta.14
Ionic CLI Version: 1.3.1
AngularJS v1.3.8
WARNING [Project: :org.apache.cordova.engine.crosswalk:382300-xwalk_core_library] Current NDK support is deprecated. Alternative will be provided in the future.
:mergeDebugResourcesC:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine
.crosswalk\rsgapp382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png
ERROR: Unable to open PNG file
Error: Failed to run command:
C:\Users\AppData\Local\Android\sdk\build-tools\21.0.2\aapt.exe s-i C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk 382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png -o C:\Users\platforms\android\build\intermediates\res\debug\drawable-hdpi-v4\color_picker_advanced_select_handle.png
Error Code: 42
Output: C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_pick
er_advanced_select_handle.png
ERROR: Unable to open PNG file
:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':mergeDebugResources'.
Error: Failed to run command: C:\Users\AppData\Local\Android\sdk\build-tools\21.0.2\aapt.exe s -i C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk 382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png -o C:\Users\platforms\android\build\intermediates\res\debug\drawable-hdpi-v4\color_picker_advanced_select_handle.png
Error Code: 42
Output: C:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png
ERROR: Unable to open PNG file
Looks like you were getting similar errors to this question, which was that on Windows, path names are restricted to 260 characters, so moving to a directory with a shorter path name should fix your issues.

Categories

Resources