Based on other issues i've been reading this might be a conflict with react-native-maps. I have tried EVERYTHING to fix this and I am absolutely losing my mind.
ios/Podfile:# N/A
AppDelegate.m:// N/A
android/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 = 27
supportLibVersion = "27.1.1"
googlePlayServicesVersion = "15.0.1"
playServicesVersion = "15.0.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 {
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'
}
maven {
url "$rootDir/../node_modules/react-native-background-geolocation-android/android/libs"
}
maven {
url "$rootDir/../node_modules/react-native-background-fetch/android/libs"
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
ext {
compileSdkVersion = 27
targetSdkVersion = 27
buildToolsVersion = "27.0.3"
supportLibVersion = "27.1.1"
googlePlayServicesVersion = "15.0.1"
playServicesVersion = "15.0.1"
}
android/app/build.gradle:apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
applicationId "com.convoyerandroid"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
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 {
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// 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
}
}
}
}
dependencies {
implementation project(':react-native-firebase')
implementation project(':react-native-video')
implementation project(':react-native-prompt-android')
implementation project(':react-native-vector-icons')
implementation 'com.android.support:exifinterface:27.+'
implementation project(':react-native-background-fetch')
implementation project(':react-native-background-geolocation-android')
implementation project(':react-native-gesture-handler')
implementation (project(':react-native-camera')) {
exclude group: "com.android.support"
}
implementation project(':react-native-nfc-manager')
implementation project(':react-native-device-info')
implementation project(':react-native-background-fetch')
implementation project(':react-native-maps')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "com.android.support:appcompat-v7:$rootProject.supportLibVersion"
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
// com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
android/settings.gradle:// N/A
MainApplication.java:// N/A
AndroidManifest.xml:<!-- N/A -->
If known, the version of the platform are you experiencing the issue on:
Operating System:
N/AN/AN/AReact Native version:React Native Firebase library version:5.1.0-rc1Firebase module(s) you're using that has the issue:TypeScript?N/AExpoKit?ExpoKitN/A
Think react-native-firebase is great? Please consider supporting the project with any of the below:
React Native Firebase and Invertase on Twitter@arapocket try to put this:
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
on your android/app/build.gradle, i had the same problem and it worked for me.
@lalmachado Wow. I was sure I tried this before. It worked! In my last try the app was crashing after I did that. Not sure if it will happen again but thank you, sir.
Most helpful comment
@arapocket try to put this:
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = trueon your android/app/build.gradle, i had the same problem and it worked for me.