Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #8

Closed
NanZii opened this issue May 14, 2019 · 4 comments

Comments

@NanZii
Copy link

NanZii commented May 14, 2019

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

@a-maurice
Copy link
Contributor

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.

@NanZii
Copy link
Author

NanZii commented May 15, 2019

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

@a-maurice
Copy link
Contributor

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?

@NanZii
Copy link
Author

NanZii commented May 17, 2019

I upgraded to firebase_cpp_sdk_6.0.0 this bug is resolved, maybe i am used old sdk

@NanZii NanZii closed this as completed May 17, 2019
@firebase firebase locked and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants