FAILURE: Build failed with an exception.
While creating built it's working fine but when it comes to run the built that is after performing react-native run-android I am getting built got failed with the above message
Here is my built.gradle :
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.0.0'
// classpath 'com.google.gms:google-services:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "26.1.0"
}
Have you run the link command? Seems as though it hasn't installed properly. E.g. check https://github.com/invertase/react-native-firebase-starter/blob/master/android/settings.gradle#L2 and other files for comparison.
yup I have run the link command also still stuck at the same stage from
last 2 days please help me out
On Wed, Aug 1, 2018 at 3:30 PM, Elliot Hesp notifications@github.com
wrote:
Have you run the link command? Seems as though it hasn't installed
properly. E.g. check https://github.com/invertase/
react-native-firebase-starter/blob/master/android/settings.gradle#L2 and
other files for comparison.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/invertase/react-native-firebase/issues/1360#issuecomment-409521975,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AnzagGfHxiDDlF4Zxw8QR1yDyGYpPxr6ks5uMXxWgaJpZM4Vp4Us
.
I solved this exact same problem by moving google()
repository at the top of the list.
build.gradle
allprojects {
repositories {
google()
mavenLocal()
jcenter()
maven {
url 'https://maven.google.com'
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
This issue has been automatically marked as stale because it has not had recent user activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
use this first
yarn remove react-native-fetch-blob
Remove compile('react-native-fetch-blob') from build.gradle from android folder
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve project :react-native-app-auth.
Required by:
project :app
Unable to find a matching configuration of project :react-native-app-auth: None of the consumable configurations have attributes.
Can anyone please tell me how to solve this issue? I already tried with ./gradlew clean in android, also delete node module and then npm install and run in android. Nothing work. Please help if any body know any other way. Thanks in advance!
@SilajitBukaiSil Got the same problem. Do you know how to solve this?
@SilajitBukaiSil
i have same problem. did you solve that?
1st method,
Also remove the import of react-native-fetch-blob in any screen
yarn remove (respective command ** for instance react-native-fetch-blob)
Then go to
android/build.gradle and remove the line of compile(react-native-fetch-blob)
Then go to
main/src/java/mainactivity.java
And remove the import and line containing react-native-fetch-blob
Then finally
Command line
cd android
gradlew clean
cd..
react-native run-android
2nd method
remove node modules
npm install
cd android
gradlew clean
cd..
react-native run-android
3rd method
remove build folder from android
and then compile again
Everyone, first, try react-native-clean-project and after installing it run react-native clean-project-auto
- second, if you still have an issue open a new issue and follow the template thoroughly please
Most helpful comment
Can anyone please tell me how to solve this issue? I already tried with ./gradlew clean in android, also delete node module and then npm install and run in android. Nothing work. Please help if any body know any other way. Thanks in advance!