[Bug] Unable to find Method com/google/firebase/remoteconfig/ConfigUpdateListenerRegistration.remove
See original GitHub issue[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.3.24f1
- Firebase Unity SDK version: 11.1.0
- Source you installed the SDK: .tgz
- Problematic Firebase Component: remote config
- Other Firebase Components in use: messaging, analytics
- Additional SDKs you are using: Google Play AppUpdate, AppBundle, AssetDelivery, InAppReview
- Platform you are using the Unity editor on: Windows/Mac
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP
- Pre-built SDK from the website or open-source from this repo: prebuilt
[REQUIRED] Please describe the issue here:
Since the v11.0 upgrade when I launch the app and try to access FirebaseRemoteConfig.DefaultInstance, I have the following warning on the logcat console: java.lang.NoSuchMethodError: no non-static method “Lcom/google/firebase/remoteconfig/ConfigUpdateListenerRegistration;.remove()V”
followed by the error: Unable to find Method com/google/firebase/remoteconfig/ConfigUpdateListenerRegistration.remove (signature ‘()V’, instance). Please verify the AAR which contains the com/google/firebase/remoteconfig/ConfigUpdateListenerRegistration class is included in your app.
What’s the issue repro rate? 100%
using Firebase version 10.7.0 everything works as expected.
Relevant Code:
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task =>
{
var dependencyStatus = task.Result;
if( dependencyStatus == DependencyStatus.Available )
{
// this log appear in the console
Debug.Log( $"RemoteConfig --- FIREBASE CheckAndFixDependenciesAsync complete. {task.Result}" );
// Create and hold a reference to your FirebaseApp,
// where app is a Firebase.FirebaseApp property of your application class.
FirebaseAppInstance = FirebaseApp.DefaultInstance;
// Apply RemoteConfig default values
FirebaseRemoteConfig.DefaultInstance.SetDefaultsAsync( DefaultValues ).ContinueWithOnMainThread( _ =>
{
// This log never appear in the console
Debug.Log( "FIREBASE SetDefaultsAsync complete." );
// Get config from Firebase
FirebaseRemoteConfig.DefaultInstance.FetchAndActivateAsync().ContinueWithOnMainThread( _ =>
{
var remoteConfig = FirebaseRemoteConfig.DefaultInstance;
var info = remoteConfig.Info;
// TODO get values from RemoteConfig
} );
} );
}
else
{
Debug.LogError( $"Could not resolve all Firebase dependencies: {dependencyStatus}" );
// Firebase Unity SDK is not safe to use here.
}
});
see attached my mainTemplate.gradle file mainTemplate.gradle.txt
Issue Analytics
- State:
- Created 4 months ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Unable to find method 'org.gradle.api.file.ProjectLayout. ...
The issue was that I upgraded to Android Studio v4, and seem like the download project was created using Android Studio v3. After...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, it worked ! Thank you very much.
Hi @lagoonbbbo
Thanks for the bug report. The problem is that the symbols are being stripped by minification. We will try to get this fixed in the next release, but in the meantime, a pretty simple workaround is available.
In your
Assets/Plugins/Android/proguard-user.txt
file, you can add: