react-native-maps + react-native-firebase Android app crashes on launch
up vote
0
down vote
favorite
I'm having trouble running my app with react-native-firebase + react-native-maps.
The app crashes on launch on android, while in iOS it runs perfectly without any issues.
Enviroment:
OS: macOS Mojave 10.14.1
React Native: 0.57.4
react-native-maps: 0.22.1
react-native-firebase: 5.1.0
My top build.gradle is:
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
buildDir = "$rootDir/build/${rootProject.name}/${project.name}"
repositories {
google()
mavenLocal()
maven { url 'https://maven.google.com' }
maven {
url "$rootDir/../node_modules/react-native/android"
}
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
}
And my app build.gradle is:
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "py.com.kynox.pelotajara"
minSdkVersion 16
targetSdkVersion 27
versionCode 138
versionName "1.3.8"
ndk {
abiFilters "armeabi-v7a", "x86"
}
multiDexEnabled true
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
dexOptions {
dexInProcess = false
}
flavorDimensions "devStages"
productFlavors {
dev {
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
println "Using Dev google-service.json"
copy {
from 'src/dev/'
include '*.json'
into '.'
}
copy {
from 'src/dev/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
prod {
applicationIdSuffix ""
versionNameSuffix ""
println "Using Production google-service.json"
copy {
from 'src/prod/'
include '*.json'
into '.'
}
copy {
from 'src/prod/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
staging {
applicationIdSuffix ".staging"
versionNameSuffix "-staging"
println "Using Staging google-service.json"
copy {
from 'src/staging/'
include '*.json'
into '.'
}
copy {
from 'src/staging/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
}
}
dependencies {
/* PLAY SERVICES */
implementation "com.google.android.gms:play-services-base:16.0.1"
/* FIREBASE */
implementation project(':react-native-firebase')
implementation "com.google.firebase:firebase-core:16.0.4"
implementation "com.google.firebase:firebase-messaging:17.3.4"
implementation "com.google.firebase:firebase-invites:16.0.4"
implementation "com.google.firebase:firebase-config:16.1.0"
/* RN AND OTHER LIBRARIES*/
implementation 'com.facebook.react:react-native:+'
implementation project(':lottie-react-native')
implementation project(':react-native-view-shot')
implementation project(':react-native-share')
implementation project(':react-native-vector-icons')
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms'
}
implementation project(':react-native-linear-gradient')
implementation project(':react-native-fabric')
implementation('com.crashlytics.sdk.android:crashlytics:2.6.3@aar') {
transitive = true;
}
implementation(project(':react-native-fbsdk')) {
exclude(group: 'com.facebook.android', module: 'facebook-android- sdk')
}
implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
implementation ("com.google.android.gms:play-services-maps:+") {
force = true;
}
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:multidex:1.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
App crashes on launch, logcat throws this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/maps/GoogleMapOptions;
Has anyone been able to make this two work together?
android firebase react-native maps react-native-android
add a comment |
up vote
0
down vote
favorite
I'm having trouble running my app with react-native-firebase + react-native-maps.
The app crashes on launch on android, while in iOS it runs perfectly without any issues.
Enviroment:
OS: macOS Mojave 10.14.1
React Native: 0.57.4
react-native-maps: 0.22.1
react-native-firebase: 5.1.0
My top build.gradle is:
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
buildDir = "$rootDir/build/${rootProject.name}/${project.name}"
repositories {
google()
mavenLocal()
maven { url 'https://maven.google.com' }
maven {
url "$rootDir/../node_modules/react-native/android"
}
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
}
And my app build.gradle is:
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "py.com.kynox.pelotajara"
minSdkVersion 16
targetSdkVersion 27
versionCode 138
versionName "1.3.8"
ndk {
abiFilters "armeabi-v7a", "x86"
}
multiDexEnabled true
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
dexOptions {
dexInProcess = false
}
flavorDimensions "devStages"
productFlavors {
dev {
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
println "Using Dev google-service.json"
copy {
from 'src/dev/'
include '*.json'
into '.'
}
copy {
from 'src/dev/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
prod {
applicationIdSuffix ""
versionNameSuffix ""
println "Using Production google-service.json"
copy {
from 'src/prod/'
include '*.json'
into '.'
}
copy {
from 'src/prod/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
staging {
applicationIdSuffix ".staging"
versionNameSuffix "-staging"
println "Using Staging google-service.json"
copy {
from 'src/staging/'
include '*.json'
into '.'
}
copy {
from 'src/staging/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
}
}
dependencies {
/* PLAY SERVICES */
implementation "com.google.android.gms:play-services-base:16.0.1"
/* FIREBASE */
implementation project(':react-native-firebase')
implementation "com.google.firebase:firebase-core:16.0.4"
implementation "com.google.firebase:firebase-messaging:17.3.4"
implementation "com.google.firebase:firebase-invites:16.0.4"
implementation "com.google.firebase:firebase-config:16.1.0"
/* RN AND OTHER LIBRARIES*/
implementation 'com.facebook.react:react-native:+'
implementation project(':lottie-react-native')
implementation project(':react-native-view-shot')
implementation project(':react-native-share')
implementation project(':react-native-vector-icons')
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms'
}
implementation project(':react-native-linear-gradient')
implementation project(':react-native-fabric')
implementation('com.crashlytics.sdk.android:crashlytics:2.6.3@aar') {
transitive = true;
}
implementation(project(':react-native-fbsdk')) {
exclude(group: 'com.facebook.android', module: 'facebook-android- sdk')
}
implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
implementation ("com.google.android.gms:play-services-maps:+") {
force = true;
}
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:multidex:1.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
App crashes on launch, logcat throws this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/maps/GoogleMapOptions;
Has anyone been able to make this two work together?
android firebase react-native maps react-native-android
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm having trouble running my app with react-native-firebase + react-native-maps.
The app crashes on launch on android, while in iOS it runs perfectly without any issues.
Enviroment:
OS: macOS Mojave 10.14.1
React Native: 0.57.4
react-native-maps: 0.22.1
react-native-firebase: 5.1.0
My top build.gradle is:
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
buildDir = "$rootDir/build/${rootProject.name}/${project.name}"
repositories {
google()
mavenLocal()
maven { url 'https://maven.google.com' }
maven {
url "$rootDir/../node_modules/react-native/android"
}
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
}
And my app build.gradle is:
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "py.com.kynox.pelotajara"
minSdkVersion 16
targetSdkVersion 27
versionCode 138
versionName "1.3.8"
ndk {
abiFilters "armeabi-v7a", "x86"
}
multiDexEnabled true
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
dexOptions {
dexInProcess = false
}
flavorDimensions "devStages"
productFlavors {
dev {
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
println "Using Dev google-service.json"
copy {
from 'src/dev/'
include '*.json'
into '.'
}
copy {
from 'src/dev/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
prod {
applicationIdSuffix ""
versionNameSuffix ""
println "Using Production google-service.json"
copy {
from 'src/prod/'
include '*.json'
into '.'
}
copy {
from 'src/prod/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
staging {
applicationIdSuffix ".staging"
versionNameSuffix "-staging"
println "Using Staging google-service.json"
copy {
from 'src/staging/'
include '*.json'
into '.'
}
copy {
from 'src/staging/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
}
}
dependencies {
/* PLAY SERVICES */
implementation "com.google.android.gms:play-services-base:16.0.1"
/* FIREBASE */
implementation project(':react-native-firebase')
implementation "com.google.firebase:firebase-core:16.0.4"
implementation "com.google.firebase:firebase-messaging:17.3.4"
implementation "com.google.firebase:firebase-invites:16.0.4"
implementation "com.google.firebase:firebase-config:16.1.0"
/* RN AND OTHER LIBRARIES*/
implementation 'com.facebook.react:react-native:+'
implementation project(':lottie-react-native')
implementation project(':react-native-view-shot')
implementation project(':react-native-share')
implementation project(':react-native-vector-icons')
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms'
}
implementation project(':react-native-linear-gradient')
implementation project(':react-native-fabric')
implementation('com.crashlytics.sdk.android:crashlytics:2.6.3@aar') {
transitive = true;
}
implementation(project(':react-native-fbsdk')) {
exclude(group: 'com.facebook.android', module: 'facebook-android- sdk')
}
implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
implementation ("com.google.android.gms:play-services-maps:+") {
force = true;
}
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:multidex:1.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
App crashes on launch, logcat throws this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/maps/GoogleMapOptions;
Has anyone been able to make this two work together?
android firebase react-native maps react-native-android
I'm having trouble running my app with react-native-firebase + react-native-maps.
The app crashes on launch on android, while in iOS it runs perfectly without any issues.
Enviroment:
OS: macOS Mojave 10.14.1
React Native: 0.57.4
react-native-maps: 0.22.1
react-native-firebase: 5.1.0
My top build.gradle is:
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
buildDir = "$rootDir/build/${rootProject.name}/${project.name}"
repositories {
google()
mavenLocal()
maven { url 'https://maven.google.com' }
maven {
url "$rootDir/../node_modules/react-native/android"
}
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
}
And my app build.gradle is:
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "py.com.kynox.pelotajara"
minSdkVersion 16
targetSdkVersion 27
versionCode 138
versionName "1.3.8"
ndk {
abiFilters "armeabi-v7a", "x86"
}
multiDexEnabled true
}
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
dexOptions {
dexInProcess = false
}
flavorDimensions "devStages"
productFlavors {
dev {
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
println "Using Dev google-service.json"
copy {
from 'src/dev/'
include '*.json'
into '.'
}
copy {
from 'src/dev/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
prod {
applicationIdSuffix ""
versionNameSuffix ""
println "Using Production google-service.json"
copy {
from 'src/prod/'
include '*.json'
into '.'
}
copy {
from 'src/prod/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
staging {
applicationIdSuffix ".staging"
versionNameSuffix "-staging"
println "Using Staging google-service.json"
copy {
from 'src/staging/'
include '*.json'
into '.'
}
copy {
from 'src/staging/'
into 'src/main/'
include 'res/**'
}
dimension "devStages"
}
}
}
dependencies {
/* PLAY SERVICES */
implementation "com.google.android.gms:play-services-base:16.0.1"
/* FIREBASE */
implementation project(':react-native-firebase')
implementation "com.google.firebase:firebase-core:16.0.4"
implementation "com.google.firebase:firebase-messaging:17.3.4"
implementation "com.google.firebase:firebase-invites:16.0.4"
implementation "com.google.firebase:firebase-config:16.1.0"
/* RN AND OTHER LIBRARIES*/
implementation 'com.facebook.react:react-native:+'
implementation project(':lottie-react-native')
implementation project(':react-native-view-shot')
implementation project(':react-native-share')
implementation project(':react-native-vector-icons')
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms'
}
implementation project(':react-native-linear-gradient')
implementation project(':react-native-fabric')
implementation('com.crashlytics.sdk.android:crashlytics:2.6.3@aar') {
transitive = true;
}
implementation(project(':react-native-fbsdk')) {
exclude(group: 'com.facebook.android', module: 'facebook-android- sdk')
}
implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
implementation ("com.google.android.gms:play-services-maps:+") {
force = true;
}
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:multidex:1.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
App crashes on launch, logcat throws this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/maps/GoogleMapOptions;
Has anyone been able to make this two work together?
android firebase react-native maps react-native-android
android firebase react-native maps react-native-android
edited Nov 14 at 17:40
asked Nov 14 at 17:31
JoseGuya
163
163
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53305801%2freact-native-maps-react-native-firebase-android-app-crashes-on-launch%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown