React-native-firebase: [RNFirebasePerformance] error: cannot access zze

Created on 29 May 2018  路  7Comments  路  Source: invertase/react-native-firebase

> Task :react-native-firebase:compileDebugJavaWithJavac
/Users/spritlesoftware/Projects/gaming-platform/node_modules/react-native-firebase/android/src/main/java/io/in
vertase/firebase/perf/RNFirebasePerformance.java:39: error: cannot access zze
    getOrCreateTrace(identifier).start();
                                ^
  class file for com.google.android.gms.internal.firebase-perf.zze not found
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.
1 error

When building our RN Android app, we are seeing this issue.

ReactNative - 0.52.3
RN Firebase - 4.2.0
javac - 10.0.1
com.google.firebase:firebase-perf:15.1.0

Help appreciated.

Thanks!

Most helpful comment

Run this export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
You'll thank me later ;)

All 7 comments

Unfortunately, you're going to have to downgrade to Java 8 - we're not yet sure whether this is a firebase issue, or something relating to RNFirebase itself, but we have an issue open to track: https://github.com/invertase/react-native-firebase/issues/1070

Thanks @chrisbianca 馃憤

Downgrading to Java 8 didn't fix the issue for me.

Can you try the following version: "com.google.firebase:firebase-perf:16.0.0"


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

Hey Guys, the workaround while we wait for a solutions for this issue would be next:

on file: /node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java comment next lines:

`@ReactMethod
public void start(String identifier) {
//getOrCreateTrace(identifier).start(); <- comment
}

@ReactMethod
public void stop(String identifier) {
//getOrCreateTrace(identifier).stop(); <- comment
//traces.remove(identifier); <- comment

}

@ReactMethod
public void incrementCounter(String identifier, String event) {
//getOrCreateTrace(identifier).incrementCounter(event); <- comment
}`

Go to this file from android studio like this:
issue_perf_firebase

I hope this issue is fixed in next versions.
Let me know if it work for you guys.

Run this export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
You'll thank me later ;)

You don't need to down grade Java.
You can run more than one version of Java on MacOS. You can set the version of your terminal with this command in MacOS.

# List Java versions installed
/usr/libexec/java_home -V

# Java 11
export JAVA_HOME=$(/usr/libexec/java_home -v 11)

# Java 1.8 (8)
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

# Java 1.7
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)

# Java 1.6
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)

You can set the default value in the .bashrc, .profile, or .zprofile 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joecaraccio picture joecaraccio  路  3Comments

n-scope picture n-scope  路  3Comments

jonaseck2 picture jonaseck2  路  3Comments

mahyarr picture mahyarr  路  3Comments

NordlingDev picture NordlingDev  路  3Comments