Java Question Can not get the correct artifacts to use for FirebaseAuthUI Library

DonManfred

Expert
Licensed User
Longtime User
While trying to update the library i got some help fixing the Resources-Problem i had. Thank you @asubias :cool:?

I guess Google changed the SDK as i can not get the wrapper Library Compiled dues to missing Classes which can not be found.

Simple Library Compiler
Starting step: Compiling Java code.
exists: False
exists2: True
E:\B4ALibs.workspace\FirebaseUI\src\de\donmanfred\FirebaseUIWrapper.java:68: error: cannot access InternalAuthProvider
this.auth = FirebaseAuth.getInstance();
^
class file for com.google.firebase.auth.internal.InternalAuthProvider not found
Note: E:\B4ALibs.workspace\FirebaseUI\src\de\donmanfred\SignInIntentBuilderWrapper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: E:\B4ALibs.workspace\FirebaseUI\src\de\donmanfred\FirebaseOptionwrapper.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

javac 11.0.1
Error.

Did Google changed the source (maven which contains this class)?

Any hints about where (which maven) the classes are now included?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm able to compile your library with Eclipse using these references:

1. firebaseui-classes.jar extracted from the aar (and renamed): https://bintray.com/firebaseui/firebase-ui/firebase-ui-auth/6.2.0#files/com/firebaseui/firebase-ui-auth/6.2.0
2. C:\android-sdk-windows\extras\b4a_remote\com\google\android\gms\play-services-basement\17.1.1\unpacked-play-services-basement-17.1.1\jars\classes.jar
3. C:\android-sdk-windows\extras\b4a_remote\com\google\android\gms\play-services-tasks\17.0.0\unpacked-play-services-tasks-17.0.0\jars\classes.jar
4. C:\android-sdk-windows\extras\b4a_remote\com\google\firebase\firebase-auth\19.2.0\unpacked-firebase-auth-19.2.0\jars\classes.jar
5. C:\android-sdk-windows\extras\b4a_remote\com\google\firebase\firebase-common\19.3.0\unpacked-firebase-common-19.3.0\jars\classes.jar
 

DonManfred

Expert
Licensed User
Longtime User
I guess something is messed up in my PC then.

I deleted all references from eclipse (and all files in libs folder). I added references to the mentioned classes.jar(s) to my Eclipse-Project.
As usually i did copied the files to my eclipse project and added them in the configure build paths dialog. i renamed the classes.jar to something useful.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="E:/Basic4android/Libraries/B4AShared.jar"/>
<classpathentry kind="lib" path="E:/Basic4android/Libraries/Core.jar"/>
<classpathentry kind="lib" path="E:/Androidrdy2runsdk/platforms/android-28/android.jar"/>
<classpathentry kind="lib" path="libs/firebase-ui-auth-6.2.0.jar" sourcepath="libs/firebase-ui-auth-6.2.0-sources.jar"/>
<classpathentry kind="lib" path="libs/play-services-tasks-17.0.0.jar"/>
<classpathentry kind="lib" path="libs/play-services-basement-17.1.1.jar"/>
<classpathentry kind="lib" path="libs/firebase-auth-19.2.0.jar"/>
<classpathentry kind="lib" path="libs/firebase-common-19.3.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/LibericaJDK-8"/>
<classpathentry kind="output" path="bin"/>
</classpath>

I get the same error when compiling with SLC

Simple Library Compiler
Starting step: Compiling Java code.
exists: False
exists2: True
E:\B4ALibs.workspace\FirebaseUI\src\de\donmanfred\FirebaseUIWrapper.java:70: error: cannot access InternalAuthProvider
this.auth = FirebaseAuth.getInstance();
^
class file for com.google.firebase.auth.internal.InternalAuthProvider not found
Note: E:\B4ALibs.workspace\FirebaseUI\src\de\donmanfred\SignInIntentBuilderWrapper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

javac 11.0.1

Error.
 

DonManfred

Expert
Licensed User
Longtime User
OT You are mixing two SDKs ;-)
C:\android-sdk-windows\extras\b4a_remote\com\google\android\gms\play-services-basement\17.1.1\unpacked-play-services-basement-17.1.1\jars\classes.jar
C:\android-sdk-windows9\extras\b4a_remote\com\google\firebase\firebase-auth-interop\19.0.0\unpacked-firebase-auth-interop-19.0.0\jars
You also need to add C:\android-sdk-windows9\extras\b4a_remote\com\google\firebase\firebase-auth-interop\19.0.0\unpacked-firebase-auth-interop-19.0.0\jars
I´ll surely add this later when i´m home. After reading your post i expect it to work now ?

Thank you so much for your help!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
BTW, I use a very useful alternative file explorer named Directory Opus. It has many great features and it can also search in archives (and I've added jars to be treated as archives).
So I just searched for InternalAuthProvider , waited a minute or two and it found it.

There are other ways to find dependencies. The IDE actually does this work however it is not easily exposed. I should write a B4J tool that helps with finding all references...
 
Top