All Questions
Tagged with react-native gradle
1,253
questions
185
votes
10
answers
104k
views
spawnSync ./gradlew EACCES error when running react native project on emulator
I am trying to use
react-native run-android
to install my react-native application on an android studio emulator.
I have checked with abd-devices that the emulator is available, and I have ran ...
111
votes
14
answers
215k
views
error: package com.android.annotations does not exist
I have the following class
import com.android.annotations.NonNullByDefault;
@NonNullByDefault
public final class Log {
...
}
and here is my build.gradle file (some parts omitted)
apply plugin: ...
110
votes
11
answers
117k
views
React Native error: "Could not determine java version from '9.0.1'."
I'm working on MacOS and just starting with react-native.
One of the first steps to get started is to run: react-native run-android or react-native run-ios. But I'm getting this error:
react-native ...
79
votes
7
answers
106k
views
Build Gradle Error Could not get unknown property 'compile'
i have react native porject when run android this error showed
Build file 'C:\dev\icnet_final\android\app\build.gradle' line: 213
A problem occurred evaluating project ':app'.
Could not get unknown ...
64
votes
3
answers
73k
views
Recommended .gitignore for react-native [duplicate]
I'm trying out react native and ejected into a full build environment. Sadly, the eject-script did not create a sensible .gitignore file.
Not knowing a lot about app-development, I wonder what ...
56
votes
15
answers
92k
views
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Java\jdk-17\bin\java.exe
I've been pulling my hair over this for 3 days now,
every time I run the command react-native run-android I get this error:
info Running jetifier to migrate libraries to AndroidX. You can disable it ...
55
votes
7
answers
29k
views
SecurityException during app:installDebug Task while attempting to run react-native app on MI MAX 2 android device
Running npx react-native run-android is working on the android emulator, and also on a Samsung device I have. But when connecting a MI MAX 2 device, I get the following:
> Task :app:installDebug
...
51
votes
26
answers
139k
views
React-Native assembleRelease fails for task ':app:bundleReleaseJsAndAssets'
When I run ./gradlew assembleRelease build is failed with this error:
Error:Execution failed for task ':app:bundleReleaseJsAndAssets.
> A problem occurred starting process 'command 'node'
I ...
50
votes
5
answers
57k
views
React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0
Note: Error may be different but if you are getting any error when taking android build without any changes in code for past two days
My Error - Failed to install the app. Error: Command failed: ./...
39
votes
10
answers
51k
views
Execution failed for task ':app:mergeDebugNativeLibs'. in react native
I installed react-native-pdf and now when I run "npx react-native run-android", it fails with the following:
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A ...
34
votes
6
answers
50k
views
2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs...-react native
I am trying to enable package of ffmpeg-kit-react-native in react-native.
The sample commands given in the example executes successfully. But I want to use libwebp for converting gif files to webp ...
32
votes
16
answers
120k
views
React Native build failed in android, @react-native-community/cli-platform-android /native_modules.gradle' line: 130
I've upgraded my ReactNative project from 0.59 to 0.61.2 iOS is building fine but in android i'm facing the issue in @react-native-community/cli-platform-android module.
My settings.gradle file
...
32
votes
6
answers
65k
views
React Native Unable to find a matching configuration of project (Build only)
My react native build works fine when running react-native run-android or cd android && ./gradlew assembleDebug. But I'll get the following for all every react native package I have installed ...
31
votes
5
answers
10k
views
Getting error when run react-native run-android
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':react-native-fbsdk'.
...
30
votes
1
answer
11k
views
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to install all
I am using React Native 0.26 and trying to play around with Google Plus Sign in from the below npm for Android application.
npm install react-native-google-signin --save
I am using command-line(...
28
votes
6
answers
26k
views
Getting library "libjsc.so" not found after upgrading React Native to 0.60-RC2
I have updated React Native to 0.60-RC2, migrated to AndroidX using the Android Studio refractor and used the jetifier mentioned here: https://github.com/react-native-community/discussions-and-...
26
votes
9
answers
40k
views
First React Native App: Task :app:processDebugMainManifest FAILED
Problem
I have followed the instructions as specified in https://reactnative.dev/docs/environment-setup, except for choclatey as I already have node etc. But I cannot build my app to reach the ...
25
votes
8
answers
50k
views
(React Native): Execution failed for task ':app:generatePackageList'
I am generating an apk of a project that I developed using React Native. But when I run the command ./gradlew assembleRelease The following error appears:
> Configure project :react-native-audio
...
25
votes
4
answers
107k
views
Could not determine the dependencies of task ':app:mergeDebugAssets'
When I run react-native run-android on my project,I get an build error of gradle. I already uninstalled react-native-ftp with npm uninstall --save react-native-ftp, removed that dependency of ...
24
votes
4
answers
32k
views
Error when trying to run my React Native app on Android
I've built my React Native app and tested and troubleshooted with my iOS devices for months. Now I'm trying to built and test the app on Android for the first time. The thing is, that I keep getting ...
24
votes
2
answers
18k
views
No such property: ABI for class: org.gradle.api.tasks.OutputFile
I am brand new on development of React Native. I developed a small project and want to have a release APK. Bu I go stack on release build.
Can anyone help me?
Thank you.
The error is
No such ...
24
votes
13
answers
51k
views
React Native Generating Signed APK "KeyStore file not set for signing config release"
I am trying to generate a signed APK. I have my password.keystore file located in \Dictionary\android\app and when i ran gradlew assembleRelease on cmd, the error:
Execution failed for task ':app:...
23
votes
4
answers
61k
views
Gradle: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
I saw this gradle error: "Could not initialize class org.codehaus.groovy.runtime.InvokerHelper". I have tried multiple ways listed online to fix the issue but no luck.
During the debugging, I found ...
22
votes
3
answers
54k
views
How to fix the error "Could not find method compile() for arguments [directory 'libs']" fundamentally?
I am posting the question after having a look at all similar questions and answers.
Here are the questions I studied.
Could not find method compile() for arguments Gradle
Gradle Could not find method ...
22
votes
6
answers
13k
views
How to pass BuildConfig values to dependency module?
I have some configured values in BuildConfig of App module. I want to pass those values to MyLib's BuildConfig which is dependency of App module. Is it possible?
21
votes
3
answers
23k
views
Android Studio can't find runner
I cloned a project from git and built it in android studio without any problems but I don't have (Run app) in android studio and also when I run run-android I get this error:
Failed to launch emulator....
21
votes
4
answers
43k
views
Force Gradle to use HTTP instead of HTTPS
I am trying to build react-native android app, as a dependecy I see I have gradle, but it fails to load on build.
Error message:
* What went wrong:
A problem occurred configuring root project '...
21
votes
2
answers
6k
views
Could not expand Zip in react native project
I have seen the other questions similar to this on StackOverflow, but I feel like this error pops up all the time, and none of the solutions have really lasted for me. I just recently upgraded our ...
20
votes
11
answers
23k
views
React Native Error : java.io.UncheckedIOException: Could not move temporary workspace
What went wrong:
java.io.UncheckedIOException: Could not move temporary workspace (C:\Users\Sreya\Desktop\sreya\love-knot\android.gradle\8.6\dependencies-accessors\...
20
votes
6
answers
33k
views
"RNCSafeAreaView" was not found in the UIManager
I try to open a bundle, but when the android is running it shows the next message
2020-01-05 23:15:45.366 26210-26210/com.note.principal
W/.note.principa: Accessing hidden field
Landroid/view/...
20
votes
5
answers
110k
views
"Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0." -REACT-NATIVE
I am facing this error when I am trying to run a react-native application react-native run-android, I am unable to install the application. I am trying to build a camera application. My current react-...
19
votes
7
answers
33k
views
How to enable stacktrace react-native run-android command?
I'm running a react native project via the react-native run-android. But during the build it fails stating that :react-native-device-info:processReleaseResources FAILED. Which doesn't give much info, ...
19
votes
11
answers
53k
views
Task 'assembleRelease' not found in root project 'android'
I'm using Reactnative 0.54.0 and react-native-cli 2.0.1 along side gradle 4.8.1
I have created a react-native project using create-react-native-app myProjectName
When I created the project, it doesn'...
19
votes
3
answers
3k
views
How to decrease startup time on React Native Android applications
I'm currently down the path of trying to figure out how to decrease Android startup time. It hasn't been an issue with iOS but for Android, I'm seeing anywhere from 6-10 seconds. The goal is to be ...
18
votes
5
answers
26k
views
Expiring Daemon because JVM heap space is exhausted?
I just updated the Android Studio to 3.5.0 and I'm getting
Expiring Daemon because JVM heap space is exhausted . Message while the build is running. Also, the build is taking more time to complete. ...
18
votes
9
answers
16k
views
Can't resolve symbol android.support.v4.util.Pools in react-native-gesture-handler
I am working on react-native project.
After I update my modules by running 'npm install',
I cannot find class 'Pools' which located in 'android.support.v4.util' in 'react-native-gesture-handler'.
...
18
votes
6
answers
11k
views
React-Native productFlavors (Error type 3: Activity class does not exist)
I want to use 2 productFlavors for my Android App: live and staging.
In app/build.grandle I defined them like this:
defaultConfig {
applicationId "com.some.id"
minSdkVersion 16
...
18
votes
3
answers
12k
views
Android build doesn't work (Duplicate class com.google.android.gms.internal.measurement.zzbt found in modules)
It worked fine until a week ago, but this week the build didn't work and I got the following error.
I tried the following, but I haven't solved it yet.
Any small thing is fine, so if anyone knows any ...
18
votes
12
answers
41k
views
Task :react-native-gradle-plugin:compileKotlin FAILED, 'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11)
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 936 file(s) to forward-jetify. Using 12 workers...
info JS server ...
18
votes
8
answers
49k
views
React Native: 'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11) jvm target compat
Hello everyone I am trying to create and run a react native app. I run
npx react-native init rn4 but when I run npm run android I have this error:
> Task :react-native-gradle-plugin:compileKotlin
'...
17
votes
5
answers
18k
views
Android Studio setting node directory for build (Cause: error=2, No such file or directory)
My project build fails because it's using the incorrect directory to run Node. How do I go about setting the Node directory for these compile-time tasks?
The specific task is:
app:...
17
votes
6
answers
16k
views
Getting the error "duplicate entry: com/google/android/gms/internal/zzble.class" when trying to add a package
I'm trying to add the react-native-firestack package to my app. But it keeps giving the following error :
:app:mergeDebugResources UP-TO-DATE
:app:recordFilesBeforeBundleCommandDebug
:app:...
16
votes
2
answers
38k
views
BUG! Exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version
An error occurs when trying to build an apk:
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Ruble\flutter_project\android\...
16
votes
3
answers
15k
views
Android Studio: Cannot run program "node"
I have project in React Native, and I'm not being able to build on the Android Studio due the following error.
Here's the detailed log with additional info:
java.io.IOException: Cannot run program &...
16
votes
2
answers
16k
views
ERROR: Could not find method platform() for arguments - React Native - Firebase
Has anyone faced this issue following the official documentation for react-native-firebase?
ERROR: Could not find method platform() for arguments [com.google.firebase:firebase-bom:21.1.0] on object ...
16
votes
4
answers
5k
views
Issues with resources generated by react in Android Studio 3
I recently upgraded to Android Studio 3
gradle plugin: 3.0.0-beta2
gradle: 4.1
In our project we use: "react-native": "0.46.4" with the codepush plugin.
Building:
gradlew assembleStagingDebug
...
15
votes
8
answers
68k
views
How to fix Execution failed for task ':app:processDebugManifest' in React Native?
I find an error when run the project, I try to look for many examples but fail all, this is the detail of error:
D:\myApp\android\app\src\debug\AndroidManifest.xml:22:18-91 Error:
Attribute ...
14
votes
1
answer
17k
views
error: package com.facebook.react.bridge does not exist while building react-native app [duplicate]
I have a react native app that was able to build without any problems, however today while trying to start the app on an emulator I got the following error:
my_local_path_to_node_modules\node_modules@...
14
votes
4
answers
5k
views
Getting Error While Running React Native App
I am facing the below error form yesterday when I am trying to run the project.
Execution failed for task ':app:checkDEVDebugAarMetadata'.
A failure occurred while executing
com.android.build.gradle....
14
votes
3
answers
8k
views
React Native - Automatic version name from package.json to android build manifest
Currently I have a react native app and the issue that I have is that is very time consuming to update the version on every build or commit.
Also, I have Sentry enabled so every time I build, some ...