Android Question Firebase RemoteConfig problem with beta 10.7

Jack Cole

Well-Known Member
Licensed User
Longtime User
After updating to beta 10.7, I get an errors with @DonManfred 's FirebaseRemoteConfig library.

I get NoSuchMethodErrors for the following code:

B4X:
    Dim set As ConfigSettingsBuilder
    set.Initialize
    set.setDeveloperModeEnabled(GlobalVars.beta)
    cfg.ConfigSettings=set.build
    cfg.Defaults=GlobalVars.Load_RemoteConfigDefaults

I try removing the code to set developer mode, then I get the error on cfg.Defaults.

B4X:
starter_getremoteconfig (java line: 771)
java.lang.NoSuchMethodError: No virtual method setDefaults(Ljava/util/Map;)V in class Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig; or its super classes (declaration of 'com.google.firebase.remoteconfig.FirebaseRemoteConfig' appears in /data/app/mindware.mindgames-2/base.apk)
    at de.donmanfred.FirebaseRemoteConfigwrapper.setDefaults(FirebaseRemoteConfigwrapper.java:77)
    at mindware.mindgames.starter._getremoteconfig(starter.java:771)
    at mindware.mindgames.starter._service_create(starter.java:973)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at mindware.mindgames.starter.onCreate(starter.java:56)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3264)
    at android.app.ActivityThread.access$1900(ActivityThread.java:181)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6119)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)

I get the same error on Fetch2. I assume the underlying SDK must have changed with the latest update.
 

DonManfred

Expert
Licensed User
Longtime User
I assume the underlying SDK must have changed with the latest update.
Sounds like you are right. I need to check it. Haven´t used the lib for a long time.
 
Upvote 0

danielcharles

New Member
Hello,

Describe the bug

final remoteConfig = await RemoteConfig.instance;
await remoteConfig.fetch(expiration: const Duration(seconds: 3000));
await remoteConfig.activateFetched();
It only happens when I compile for the first time, then it doesn't generate the error

W/FirebaseRemoteConfig(28083): Could not update ABT experiments.
W/FirebaseRemoteConfig(28083): com.google.firebase.abt.AbtException: The Analytics SDK is not available. Please check that the Analytics SDK is included in your app dependencies.
W/FirebaseRemoteConfig(28083): at com.google.firebase.abt.FirebaseABTesting.throwAbtExceptionIfAnalyticsIsNull(com.google.firebase:firebase-abt@@19.0.0:293)
W/FirebaseRemoteConfig(28083): at com.google.firebase.abt.FirebaseABTesting.replaceAllExperiments(com.google.firebase:firebase-abt@@19.0.0:119)
W/FirebaseRemoteConfig(28083): at com.google.firebase.remoteconfig.FirebaseRemoteConfig.updateAbtWithActivatedExperiments(com.google.firebase:firebase-config@@19.0.3:725)
W/FirebaseRemoteConfig(28083): at com.google.firebase.remoteconfig.FirebaseRemoteConfig.processActivatePutTask(com.google.firebase:firebase-config@@19.0.3:663)
W/FirebaseRemoteConfig(28083): at com.google.firebase.remoteconfig.FirebaseRemoteConfig.access$lambda$0(Unknown Source:0)
W/FirebaseRemoteConfig(28083): at com.google.firebase.remoteconfig.FirebaseRemoteConfig$$Lambda$11.then(Unknown Source:2)
W/FirebaseRemoteConfig(28083): at com.google.android.gms.tasks.zzd.run(Unknown Source:5)
W/FirebaseRemoteConfig(28083): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/FirebaseRemoteConfig(28083): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/FirebaseRemoteConfig(28083): at java.lang.Thread.run(Thread.java:764)
 
Upvote 0
Top