Unable to find Method com/google/firebase/remoteconfig/FirebaseRemoteConfig.setDefaults. Please verify the AAR which contains the com/google/firebase/remoteconfig/FirebaseRemoteConfig class is included in your app.
NanZii opened this issue · 4 comments
When i run sample code remote_config in quickstart-cpp-master repository, i caught "A/firebase: Unable to find Method com/google/firebase/remoteconfig/FirebaseRemoteConfig.setDefaults (signature '(ILjava/lang/String;)V', instance). Please verify the AAR which contains the com/google/firebase/remoteconfig/FirebaseRemoteConfig class is included in your app." error.
Anyone have idea to fix that ? Tks
Hi,
Typically that means that the Android dependencies are missing. Are you using the quickstart as is, or did you make any modifications to the build.gradle file? What version of the Firebase SDK are you using?
And could you share more of the logs, there might be something in them that can indicate the issue.
Firebase SDK version: firebase_cpp_sdk_6.0.0
My setup in gradle follow this document https://firebase.google.com/docs/cpp/setup?authuser=0&platform=android and i used ndk-build to add SDKs
Detail about this bug:
System.err: java.lang.NoSuchMethodError: no non-static method "Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;.setDefaults(ILjava/lang/String;)V
A/firebase: Unable to find Method com/google/firebase/remoteconfig/FirebaseRemoteConfig.setDefaults (signature '(ILjava/lang/String;)V', instance). Please verify the AAR which contains the com/google/firebase/remoteconfig/FirebaseRemoteConfig class is included in your app.
Seem this bug just happen with Remote Config. I tested with Firebase Analytics, it's ok
It seems like you are in a bad state, but I'm not quite sure how. For some context, the newest version of the Remote Config library for Android removed that particular function. The 6.0.0 version of the C++ library also removed the reference to that function (it used to be here: https://github.com/firebase/firebase-cpp-sdk/blob/master/remote_config/src/remote_config_android.cc#L40)
It would seem that you are using a prior version of the C++ library that is still trying to reference old functions in the Android library, but you are also using the new version of the Android library, so it can't resolve them. Can you confirm that you are indeed using version 6.0.0 of the C++ SDK? Also, what are your Android dependencies being set as?
I upgraded to firebase_cpp_sdk_6.0.0 this bug is resolved, maybe i am used old sdk