Closed aryalprakash closed 5 years ago
Hi, have you tried to run the example project? Also, can you post your build.gradle?
My build.gradle `// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { ext { buildToolsVersion = "27.0.3" minSdkVersion = 16 compileSdkVersion = 27 targetSdkVersion = 26 supportLibVersion = "27.1.1" } repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.google.gms:google-services:4.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
allprojects { repositories { google() mavenLocal() 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" } maven { url "https://jitpack.io" } jcenter() } }
task wrapper(type: Wrapper) { gradleVersion = '4.4' distributionUrl = distributionUrl.replace("bin", "all") } `
Im having the same issue, the example app works perfectly.
Im using react-native-firebase-starter with a fresh install, maybe this is a reproduceable way for you. Im sorry I cannot provide more information, this is my very first mobile app
This is part of the stacktrace.
com.android.build.api.transform.TransformException: Error while generating the main dex list.
> Error while generating the main dex list.
> com.android.tools.r8.errors.CompilationError: Program type already present: android.support.design.widget.CoordinatorLayout$DefaultBehavior
> Program type already present: android.support.design.widget.CoordinatorLayout$DefaultBehavior
@ntgussoni and anyone who's having the same error;
I had the same error and I got my project to compile by adding
implementation 'com.android.support:design:27.1.0'
inside app/build.gradle
dependencies.
Problem is with com.android.support:design
not trageting to latest.. i hope this can be fixed currently by
adding this line to ./android/build.gradle(module)
not app
//Ensure that all dependencies use the same version of the Android Support library
subprojects {
subproject ->
afterEvaluate{
if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex')) {
details.useVersion "${rootProject.ext.supportLibVersion}"
}
}
}
}
I am getting error after adding this package. `FAILURE: Build failed with an exception.
My
android.defaultConfig
hasmultiDexEnabled true
. Anddependencies { classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.google.gms:google-services:4.0.1'