Android Question Firebase Auth can't initialize

tsteward

Well-Known Member
Licensed User
Longtime User
I have FBase crashlytics and push messages working but I cannot get login with Google using FBase auth to initialise
I get the attached error below
On searching this in the forum the solution is to update kotlin-stdlib-1.7.21. I can find and download this jar file but where do I put it?

Error occurred on line: 205 (B4XMainPage)
android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:462)
at android.content.res.Resources.getString(Resources.java:555)
at anywheresoftware.b4a.objects.FirebaseAuthWrapper.Initialize(FirebaseAuthWrapper.java:82)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:22)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:275)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:150)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at anywheresoftware.b4a.keywords.Common$15.run(Common.java:1804)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
 

tsteward

Well-Known Member
Licensed User
Longtime User
Tried replacing kotlin-stdlib-1.6.10.jar with kotlin-stdlib-1.7.21.jar in libraries but can't compile app
Error
Compiling generated Java code. Error
Cannot find: C:\Program Files\Anywhere Software\B4A\libraries\kotlin-stdlib-1.6.10.jar

And putting in in the additionalib directory goves this erro
Dex: kotlin-stdlib-1.7.21 (3.22s)
Dex code (6.49s)
Dex merge Error
Error in C:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.6.10-63837438158000\dex_v1\kotlin-stdlib-1.6.10.zip:classes.dex:
Type kotlin.ArrayIntrinsicsKt is defined multiple times: C:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.6.10-63837438158000\dex_v1\kotlin-stdlib-1.6.10.zip:classes.dex, C:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.7.21-63856607434106\dex_v1\kotlin-stdlib-1.7.21.zip:classes.dex
Compilation failed
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.6.10-63837438158000\dex_v1\kotlin-stdlib-1.6.10.zip:classes.dex
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:98)
at com.android.tools.r8.D8.main(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.6.10-63837438158000\dex_v1\kotlin-stdlib-1.6.10.zip:classes.dex
at Version.fakeStackEntry(Version_3.3.20-dev+aosp1.java:0)
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:75)
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:28)
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:27)
at com.android.tools.r8.internal.vj.b(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:2)
at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:22)
at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:17)
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:85)
... 1 more
Caused by: com.android.tools.r8.internal.f: Type kotlin.ArrayIntrinsicsKt is defined multiple times: C:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.6.10-63837438158000\dex_v1\kotlin-stdlib-1.6.10.zip:classes.dex, C:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.7.21-63856607434106\dex_v1\kotlin-stdlib-1.7.21.zip:classes.dex
at com.android.tools.r8.internal.YS.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:14)
at com.android.tools.r8.internal.YS.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:22)
at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:36)
at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:10)
at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048)
at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:6)
at com.android.tools.r8.graph.E2$a.e(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
at com.android.tools.r8.dex.b.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:105)
at com.android.tools.r8.dex.b.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:28)
at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:25)
at com.android.tools.r8.D8.d(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:609)
at com.android.tools.r8.D8.c(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:1)
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:24)
... 5 more
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Tried replacing kotlin-stdlib-1.6.10.jar with kotlin-stdlib-1.7.21.jar in libraries but can't compile app
Error
Compiling generated Java code. Error
Cannot find: C:\Program Files\Anywhere Software\B4A\libraries\kotlin-stdlib-1.6.10.jar

And putting in in the additionalib directory goves this erro
Which version of libraries are you using for
  • FirebaseAnalytics
  • FirebaseAuth

Are you using B4Xpages and your code is similar to my code in first post in the thread I posted above?
It seems you didn't point to the latest version of kotlin-stdlib using #AdditionalJar or you are using both version 1.6.x and 1.7.x.
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
Which version of libraries are you using for
  • FirebaseAnalytics
  • FirebaseAuth

Are you using B4Xpages and your code is similar to my code in first post in the thread I posted above?
It seems you didn't point to the latest version of kotlin-stdlib using #AdditionalJar or you are using both version 1.6.x and 1.7.x.
Analytics V3.00
Auth V3.00
I have #AdditionalJar: kotlin-stdlib-1.7.21
I don't have any other declarations for Kotlin in my code
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
looks like it but I don't know how to fix it
check all libraries you are using for DependsOn in the xml or - when it is a b4xlib - look inside the b4xlib for any manifest.txt file which refences any other version.

Edit: It is not FirebaseAnalytics or FirebaseAuth
Seems to be another library which references kotlin...
 
Last edited:
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
check all libraries you are using for DependsOn in the xml or - when it is a b4xlib - look inside the b4xlib for any manifest.txt file which refences any other version.
Wow, thank you makes sense. Think it can go on the back burner for now.
Searching the xml files was easy.
I presume that means extracting every library?
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I suspect the reference is inside the project, not in the XML.
Have you search "kotlin-stdlib-1.6.10" in the project?

B4X:
#Region  Project Attributes
    #ApplicationLabel: FirebaseAuth
    #VersionCode: 1
    #VersionName:
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
#End Region
'#AdditionalJar: kotlin-stdlib-1.6.10
#AdditionalJar: kotlin-stdlib-1.7.21
'#AdditionalJar: kotlin-stdlib-1.9.0
#AdditionalJar: androidx.arch.core:core-runtime
 
Upvote 0
Top