invertase / react-native-firebase-starter

DEPRECATED: For RNFB v5 only.

Home Page:https://rnfirebase.io/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error using react-native run-android command. I already changed everything in the documentation and it continues

upxsolution opened this issue · comments

Issue

image
I did all the correct procedures to use the native firabase react starter kit, but the following error is occurring and it's not just me that occurs

image
image
image

see package.json
image


Project Files

iOS

Click To Expand

ios/Podfile:

  • [ X ] I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

image
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'com.google.firebase:perf-plugin:1.2.1'
classpath 'io.fabric.tools:gradle:1.28.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}

android/app/build.gradle:

image
image
apply plugin: "com.android.application"
apply plugin: "com.google.firebase.firebase-perf"
apply plugin: 'io.fabric'

import com.android.build.OutputFile

/**

  • The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
  • and bundleReleaseJsAndAssets).
  • These basically call react-native bundle with the correct arguments during the Android build
  • cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
  • bundle directly from the development server. Below you can see all the possible configurations
  • and their defaults. If you decide to add a configuration block, make sure to add it before the
  • apply from: "../../node_modules/react-native/react.gradle" line.
  • project.ext.react = [
  • // the name of the generated asset file containing your JS bundle
  • bundleAssetName: "index.android.bundle",
  • // the entry file for bundle generation
  • entryFile: "index.android.js",
  • // whether to bundle JS and assets in debug mode
  • bundleInDebug: false,
  • // whether to bundle JS and assets in release mode
  • bundleInRelease: true,
  • // whether to bundle JS and assets in another build variant (if configured).
  • // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
  • // The configuration property can be in the following formats
  • // 'bundleIn${productFlavor}${buildType}'
  • // 'bundleIn${buildType}'
  • // bundleInFreeDebug: true,
  • // bundleInPaidRelease: true,
  • // bundleInBeta: true,
  • // whether to disable dev mode in custom build variants (by default only disabled in release)
  • // for example: to disable dev mode in the staging build type (if configured)
  • devDisabledInStaging: true,
  • // The configuration property can be in the following formats
  • // 'devDisabledIn${productFlavor}${buildType}'
  • // 'devDisabledIn${buildType}'
  • // the root of your project, i.e. where "package.json" lives
  • root: "../../",
  • // where to put the JS bundle asset in debug mode
  • jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
  • // where to put the JS bundle asset in release mode
  • jsBundleDirRelease: "$buildDir/intermediates/assets/release",
  • // where to put drawable resources / React Native assets, e.g. the ones you use via
  • // require('./image.png')), in debug mode
  • resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
  • // where to put drawable resources / React Native assets, e.g. the ones you use via
  • // require('./image.png')), in release mode
  • resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
  • // by default the gradle tasks are skipped if none of the JS files or assets change; this means
  • // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
  • // date; if you have any other folders that you want to ignore for performance reasons (gradle
  • // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
  • // for example, you might want to remove it from here.
  • inputExcludes: ["android/", "ios/"],
  • // override which node gets called and with what additional arguments
  • nodeExecutableAndArgs: ["node"],
  • // supply additional arguments to the packager
  • extraPackagerArgs: []
  • ]
    */

project.ext.react = [
entryFile: "index.js",

// Sometimes (like if you use Android API<17) adb forwards don't work, so you need a bundle in the dev APK
bundleInDebug: project.hasProperty("bundleInDebug") ? project.getProperty("bundleInDebug") : false,

]

apply from: "../../node_modules/react-native/react.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.ext.compileSdkVersion

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
    applicationId "com.invertase.rnfirebasestarter"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 1
    versionName "1.0"

    // Needed to support API<21, though there is a small chance proguard shrinks things sufficiently
    multiDexEnabled true
}
splits {
    abi {
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false  // If true, also generate a universal APK
        include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
    }
}
buildTypes {
    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, "arm64-v8a": 3, "x86_64": 4]
        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 fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules

/* ----------------------------
*    REACT NATIVE FIREBASE
* ---------------------------- */

// Library as defined in settings.gradle
implementation project(path: ':react-native-firebase')

// Required dependencies
//noinspection GradleCompatible
implementation "com.google.firebase:firebase-core:16.0.9"
implementation "com.google.android.gms:play-services-base:16.1.0"

/* -------------------------
*   OPTIONAL FIREBASE SDKS
* ------------------------- */

implementation('com.google.firebase:firebase-ads:15.0.1') {
  // exclude `customtabs` as the support lib version is out of date
  // we manually add it as a dependency below with a custom version
  exclude group: 'com.android.support', module: 'customtabs'
}

// Authentication
implementation "com.google.firebase:firebase-auth:17.0.0"
// Analytics
implementation "com.google.firebase:firebase-analytics:17.0.0"
// Performance Monitoring
implementation "com.google.firebase:firebase-perf:17.0.0"
// Remote Config
implementation "com.google.firebase:firebase-config:17.0.0"
// Cloud Storage
implementation "com.google.firebase:firebase-storage:17.0.0"
// Dynamic Links
implementation "com.google.firebase:firebase-dynamic-links:17.0.0"
// Real-time Database
implementation "com.google.firebase:firebase-database:17.0.0"
// Cloud Functions
implementation "com.google.firebase:firebase-functions:17.0.0"
// Cloud Firestore
implementation "com.google.firebase:firebase-firestore:19.0.2"
// Cloud Messaging / FCM
implementation "com.google.firebase:firebase-messaging:18.0.0"
// Crashlytics
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
    transitive = true
}

/* --------------------------------
*  OPTIONAL SUPPORT LIBS
* -------------------------------- */

// Needed to support API<21, though there is a small chance proguard shrinks things sufficiently
implementation "com.android.support:multidex:1.0.3"

// For Firebase Ads
//noinspection GradleCompatible
implementation "com.android.support:customtabs:27.1.1"

// For React Native Firebase Notifications
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'

}

// 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'

android/settings.gradle:

rootProject.name = 'upxx'
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')

include ':app'
image

MainApplication.java:

image
image
image

package com.thunder.upxx;

import android.support.multidex.MultiDexApplication;

import com.facebook.react.ReactApplication;
import io.invertase.firebase.RNFirebasePackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import io.invertase.firebase.RNFirebasePackage;
// optional packages - add/remove as appropriate
import io.invertase.firebase.admob.RNFirebaseAdMobPackage;
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage;
import io.invertase.firebase.auth.RNFirebaseAuthPackage;
import io.invertase.firebase.config.RNFirebaseRemoteConfigPackage;
import io.invertase.firebase.database.RNFirebaseDatabasePackage;
import io.invertase.firebase.fabric.crashlytics.RNFirebaseCrashlyticsPackage;
import io.invertase.firebase.firestore.RNFirebaseFirestorePackage;
import io.invertase.firebase.functions.RNFirebaseFunctionsPackage;
import io.invertase.firebase.instanceid.RNFirebaseInstanceIdPackage;
import io.invertase.firebase.links.RNFirebaseLinksPackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import io.invertase.firebase.perf.RNFirebasePerformancePackage;
import io.invertase.firebase.storage.RNFirebaseStoragePackage;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends MultiDexApplication implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@OverRide
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
    new MainReactPackage(),
        new RNFirebasePackage(),
    new RNFirebasePackage(),
    // add/remove these packages as appropriate
    new RNFirebaseAdMobPackage(),
    new RNFirebaseAnalyticsPackage(),
    new RNFirebaseAuthPackage(),
    new RNFirebaseRemoteConfigPackage(),
    new RNFirebaseCrashlyticsPackage(),
    new RNFirebaseDatabasePackage(),
    new RNFirebaseFirestorePackage(),
    new RNFirebaseFunctionsPackage(),
    new RNFirebaseInstanceIdPackage(),
    new RNFirebaseLinksPackage(),
    new RNFirebaseMessagingPackage(),
    new RNFirebaseNotificationsPackage(),
    new RNFirebasePerformancePackage(),
    new RNFirebaseStoragePackage()
  );
}

@Override
protected String getJSMainModuleName() {
  return "index";
}

};

@OverRide
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}

@OverRide
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}

AndroidManifest.xml:

image

image


Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • iOS
    • [ X ] Android
    • iOS but have not tested behavior on Android
    • [ X ] Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • e.g. "react-native-firebase": "^5.5.6"
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

I don't know whether to look at the screenshots or the text. Screenshots aren't a good way to share information unless it's a graphical element out of position or something. And the formatting isn't great - use triple-backticks per the markdown info available on github like this, when I tried to reproduce and couldn't:


mike@isabela:~/work/react-random/react-native-firebase-starter (master) % git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
mike@isabela:~/work/react-random/react-native-firebase-starter (master) % yarn 
yarn install v1.17.3
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.32s.
mike@isabela:~/work/react-random/react-native-firebase-starter (master) % yarn rename
yarn run v1.17.3
$ node ./bin/rename.js
---------------------------------------------------------
Enter your Project name, e.g. My Amazing Project: rnfirebasetest
---------------------------------------------------------
Enter your Company name, e.g. My Company: kullki
---------------------------------------------------------
---------------------------------------
Updating project name: rnfirebasetest
---------------------------------------
[replaceInFile] Modified files: 
 ./android/app/src/main/java/com/invertase/rnfirebasestarter/MainActivity.java
./android/app/src/main/res/values/strings.xml
./android/settings.gradle
./ios/Podfile
./ios/RNFirebaseStarter.xcodeproj/project.pbxproj
./ios/RNFirebaseStarter.xcodeproj/xcshareddata/xcschemes/RNFirebaseStarter-tvOS.xcscheme
./ios/RNFirebaseStarter.xcodeproj/xcshareddata/xcschemes/RNFirebaseStarter.xcscheme
./ios/RNFirebaseStarter.xcworkspace/contents.xcworkspacedata
./ios/RNFirebaseStarter/AppDelegate.m
./ios/RNFirebaseStarter/Base.lproj/LaunchScreen.xib
./ios/RNFirebaseStarter/Info.plist
./ios/RNFirebaseStarterTests/RNFirebaseStarterTests.m
./app.json
./package.json
---------------------------------------
Finished updating project name
---------------------------------------

---------------------------------------
Updating package name: com.kullki.rnfirebasetest
---------------------------------------
[replaceInFile] Modified files: 
 ./android/app/build.gradle
./android/app/src/main/AndroidManifest.xml
./android/app/src/main/java/com/invertase/rnfirebasestarter/MainActivity.java
./android/app/src/main/java/com/invertase/rnfirebasestarter/MainApplication.java
---------------------------------------
Finished updating package name
---------------------------------------

---------------------------------------
Rename project files
---------------------------------------
[renameFiles] Renamed: .//ios/RNFirebaseStarter to: .//ios/rnfirebasetest
[renameFiles] Renamed: .//ios/RNFirebaseStarter-tvOS to: .//ios/rnfirebasetest-tvOS
[renameFiles] Renamed: .//ios/RNFirebaseStarter-tvOSTests to: .//ios/rnfirebasetest-tvOSTests
[renameFiles] Renamed: .//ios/RNFirebaseStarter.xcodeproj to: .//ios/rnfirebasetest.xcodeproj
[renameFiles] Renamed: .//ios/rnfirebasetest.xcodeproj/xcshareddata/xcschemes/RNFirebaseStarter-tvOS.xcscheme to: .//ios/rnfirebasetest.xcodeproj/xcshareddata/xcschemes/rnfirebasetest-tvOS.xcscheme
[renameFiles] Renamed: .//ios/rnfirebasetest.xcodeproj/xcshareddata/xcschemes/RNFirebaseStarter.xcscheme to: .//ios/rnfirebasetest.xcodeproj/xcshareddata/xcschemes/rnfirebasetest.xcscheme
[renameFiles] Renamed: .//ios/RNFirebaseStarter.xcworkspace to: .//ios/rnfirebasetest.xcworkspace
[renameFiles] Renamed: .//ios/RNFirebaseStarterTests to: .//ios/rnfirebasetestTests
[renameFiles] Renamed: .//ios/rnfirebasetestTests/RNFirebaseStarterTests.m to: .//ios/rnfirebasetestTests/rnfirebasetestTests.m
[renameFiles] Renamed: .//android/app/src/main/java/com/invertase/rnfirebasestarter to: .//android/app/src/main/java/com/invertase/rnfirebasetest
---------------------------------------
Finished renaming project files
---------------------------------------

---------------------------------------
Rename company files
---------------------------------------
[renameFiles] Renamed: .//android/app/src/main/java/com/invertase to: .//android/app/src/main/java/com/kullki
---------------------------------------
Finished renaming company files
---------------------------------------


---------------------------------------------------------
Set project parameters to:
---------------------------------------------------------
Project name:  rnfirebasetest
Company name:  kullki
Package name:  com.kullki.rnfirebasetest
---------------------------------------------------------

Done in 15.17s.
mike@isabela:~/work/react-random/react-native-firebase-starter (master *) % cp ../rnfbdemo/google-services.json ./android/app/
Amike@isabela:~/work/react-random/react-native-firebase-starter (master *) % react-native run-android
info JS server already running.
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from /home/mike/work/react-random/react-native-firebase-starter/node_modules/react-native/android

> Task :app:processDebugGoogleServices
Parsing json file: /home/mike/work/react-random/react-native-firebase-starter/android/app/google-services.json

> Task :app:processDebugManifest
/home/mike/work/react-random/react-native-firebase-starter/android/app/src/debug/AndroidManifest.xml:24:9-31:50 Warning:
        activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present

> Task :react-native-firebase:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/4/com/google/firebase/perf/network/zzg.class: D8: Interface `org.apache.http.client.ResponseHandler` not found. It's needed to make sure desugaring of `com.google.firebase.perf.network.zzg` is correct. Desugaring will assume that this interface has no default method.
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/12/com/google/android/gms/internal/clearcut/zzfd$zzb.class: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `void com.google.android.gms.internal.clearcut.zzfd$zzb.zza(long, byte)`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/12/com/google/android/gms/internal/clearcut/zzfd$zza.class: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `void com.google.android.gms.internal.clearcut.zzfd$zza.zza(long, byte)`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/42/okhttp3/internal/platform/ConscryptPlatform.class: D8: Type `org.conscrypt.Conscrypt` was not found, it is required for default or static interface methods desugaring of `java.security.Provider okhttp3.internal.platform.ConscryptPlatform.getProvider()`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/54/com/google/android/gms/internal/measurement/zzhv$zza.class: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `void com.google.android.gms.internal.measurement.zzhv$zza.zza(long, byte)`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/54/com/google/android/gms/internal/measurement/zzhv$zzc.class: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `void com.google.android.gms.internal.measurement.zzhv$zzc.zza(long, byte)`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/102/com/google/common/cache/Striped64.class: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.cache.Striped64.getUnsafe()`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/113/io/invertase/firebase/links/RNFirebaseLinks.class: D8: Type `com.google.firebase.appinvite.FirebaseAppInvite` was not found, it is required for default or static interface methods desugaring of `boolean io.invertase.firebase.links.RNFirebaseLinks.isInvitation(com.google.firebase.dynamiclinks.PendingDynamicLinkData)`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/102/com/google/common/hash/LittleEndianByteArray$UnsafeByteArray.class: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.hash.LittleEndianByteArray$UnsafeByteArray.getUnsafe()`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/102/com/google/common/primitives/UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator.class: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator.getUnsafe()`
/home/mike/work/react-random/react-native-firebase-starter/android/app/build/intermediates/transforms/FirebasePerformancePlugin/debug/102/com/google/common/util/concurrent/AbstractFuture$UnsafeAtomicHelper.class: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `void com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper.<clinit>()`

> Task :app:installDebug
02:36:53 V/ddms: execute: running am get-config
02:36:53 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
02:36:53 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel_3_API_29_NEW(AVD) - 10' for app:debug
02:36:53 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
02:36:53 D/Device: Uploading file onto device 'emulator-5554'
02:36:53 D/ddms: Reading file permision of /home/mike/work/react-random/react-native-firebase-starter/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
02:36:53 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
02:36:54 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
02:36:54 V/ddms: execute: returning
02:36:54 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
02:36:54 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
02:36:54 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 29s
50 actionable tasks: 48 executed, 2 up-to-date
info Running /home/mike/Android/Sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
8081
info Starting the app on emulator-5554 (/home/mike/Android/Sdk/platform-tools/adb -s emulator-5554 shell am start -n com.kullki.rnfirebasetest/com.kullki.rnfirebasetest.MainActivity)...
Starting: Intent { cmp=com.kullki.rnfirebasetest/.MainActivity }
mike@isabela:~/work/react-random/react-native-firebase-starter (master *) % 


So, I don't know, works for me?

Can you send me the data of your package.json I'm using the dependencies version: {
    "react": "16.8.3",
    "react-native": "0.59.9",
    "react-native-firebase": "^ 5.5.4"
  },
thanks for listening

I am sending the error without using image. what could have happened ?

C:\Users\engenharia1\Downloads\lol\upxx>react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from C:\Users\engenharia1\Downloads\lol\upxx\node_modules\react-native\android

> Task :app:preDebugBuild FAILED
Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.firebase, artifactId=firebase-messaging, version=18.0.0), toArtifact=Artifact(groupId=com.google.firebase, artifactId=firebase-iid), toArtifactVersionString=[18.0.0])

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[18.0.
  0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

  Dependency failing: com.google.firebase:firebase-messaging:18.0.0 -> com.google.firebase:firebase-iid@[18.0.0], but fire
  base-iid version was 19.0.0.

  The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
  ifact with the issue.
  -- Project 'app' depends onto com.google.firebase:firebase-config@17.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-analytics@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-ads@15.0.1
  -- Project 'app' depends onto com.google.firebase:firebase-functions@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-perf@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-ads@{strictly 15.0.1}
  -- Project 'app' depends onto com.google.firebase:firebase-messaging@{strictly 18.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-perf@17.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-core@16.0.9
  -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-core@{strictly 16.0.9}
  -- Project 'app' depends onto com.google.firebase:firebase-messaging@18.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-iid@{strictly 19.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-functions@17.0.0
  -- Project 'app' depends onto com.google.firebase:firebase-config@{strictly 17.0.0}

  For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
  endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
  github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
  uild.gradle file.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 9s
3 actionable tasks: 3 executed
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

I have the same mistake

I don't need to send the package.json. You can see I ran git status. The output was clean. Thus everything I have is exactly as you see in the github repository

It worked buddy. Thanks a lot for the help.
I believe the error was in the previous settings of android studio because normally the error that accused was about AVD manager not being connected.

info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\node_modules\react-native\android

> Task :app:processDebugGoogleServices
Parsing json file: C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\google-services.json

> Task :app:processDebugManifest
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\src\debug\AndroidManifest.xml:24:9-31:50 Warning:
        activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present

> Task :react-native-firebase:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\4\com\google\firebase\perf\network\zzg.class: D8: Interface `org.apache.http.client.ResponseHandler` not found. It's needed to make sure desugaring of `com.google.firebase.perf.network.zzg` is correct. Desugaring will assume that this interface has no default method.
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\12\com\google\android\gms\internal\clearcut\zzfd$zzb.class: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `void com.google.android.gms.internal.clearcut.zzfd$zzb.zza(long, byte)`
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\12\com\google\android\gms\internal\clearcut\zzfd$zza.class: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `void com.google.android.gms.internal.clearcut.zzfd$zza.zza(long, byte)`
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\42\okhttp3\internal\platform\ConscryptPlatform.class: D8: Type `org.conscrypt.Conscrypt` was not found, it is required for default or static interface methods desugaring of `java.security.Provider okhttp3.internal.platform.ConscryptPlatform.getProvider()`
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\54\com\google\android\gms\internal\measurement\zzhv$zza.class: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `void com.google.android.gms.internal.measurement.zzhv$zza.zza(long, byte)`
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\102\com\google\common\primitives\UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator.class: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator.getUnsafe()`
C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\intermediates\transforms\FirebasePerformancePlugin\debug\113\io\invertase\firebase\links\RNFirebaseLinks.class: D8: Type `com.google.firebase.appinvite.FirebaseAppInvite` was not found, it is required for default or static interface methods desugaring of `boolean io.invertase.firebase.links.RNFirebaseLinks.isInvitation(com.google.firebase.dynamiclinks.PendingDynamicLinkData)`

> Task :app:installDebug
10:43:10 V/ddms: execute: running am get-config
10:43:10 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
10:43:10 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel_3_API_29(AVD) - 10' for app:debug
10:43:10 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
10:43:10 D/Device: Uploading file onto device 'emulator-5554'
10:43:10 D/ddms: Reading file permision of C:\Users\engenharia1\Downloads\testreactfirebase\testereactnativefirebase\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------
10:43:11 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
10:43:13 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
10:43:13 V/ddms: execute: returning
10:43:13 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
10:43:14 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
10:43:14 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 22m 3s
48 actionable tasks: 48 executed
info Running C:\Users\engenharia1\AppData\Local\Android\Sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
8081
info Starting the app on emulator-5554 (C:\Users\engenharia1\AppData\Local\Android\Sdk/platform-tools/adb -s emulator-5554 shell am start -n com.thunder.upx/com.thunder.upx.MainActivity)...
Starting: Intent { cmp=com.thunder.upx/.MainActivity }

Glad that worked for you - I will note that this leaves you with a react-native 0.59 project, which is less than ideal as you then have to upgrade it immediately. I haven't had time and no one has proposed a PR yet to move it to react-native 0.60 so it is a little out of date. You might try this as well, for a react-native 0.60 project https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh / https://github.com/mikehardy/rnfbdemo/