-
Notifications
You must be signed in to change notification settings - Fork 259
You get Unable to convert classes into dex format. #4
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
Comments
This looks like you might have multiple versions or copies of the google-signin-support.aar? Can you share the contents of Assets/Plugins/Android? |
Hello! I went back and tried this step by step following of your build instructions and I now get this when I try and Build and Deploy: CommandInvokationFailure: Gradle build failed. stderr[ FAILURE: Build failed with an exception.
|
Next step is NEXT STEP: Went to the Build Settings and Picked Internal instead of Gradle. Get an Error: Resolution failed Failed to fetch the following dependencies: UnityEngine.Debug:LogError(Object) Go to the Plugin Play Services Resolver > Android > Resolve “Says Complete” Go to the Build Settings Menu and Build and Run Looks like it builds and Deploys. I am on slack by the way, and happy to trouble shoot all of this if there is a faster way. |
Thanks for the details! I think the problem is |
Glad to here a new version coming out: So I am now going through next steps and having some issues once I switched to internal Build in Unity. NEXT STEP: Went to the Build Settings and Picked Internal instead of Gradle. Get an Error: Resolution failed Failed to fetch the following dependencies: UnityEngine.Debug:LogError(Object) Go to the Plugin Play Services Resolver > Android > Resolve “Says Complete” Go to the Build Settings Menu and Build and Run Works Go to the App on Android Device and you get an Error when you sign in, but that is expected as I need to go to the Firebase Authentication Panel and Add Google Sign In. So after I enabled Google Oath in Firebase Panel, still get errors in the android App when trying to signing. So I when to the Scene and then Remembered that I needed to add the webclientID to the SiginIn Sample Script Attached to the Canvas. I would recommend that you remind people to do this step in your docs before the build. |
And Once I added the WebClientId to the Script it worked!!!! ( With Internal Build ). Now to add the Firebase flow (which is what I really am looking for ). |
So to add the FireBase Oath , I assume that you need to install the Firebase.oath Package for Unity as its using the FirebaseUser class. |
Right - What I did was download the Firebase SDK zip file with all the unity packages, then imported the ones I wanted to use, and follow the instructions to add the google-services.json file to the project. |
So i changed the class to add the firebase oath flow and it crashes on the android device. You need to add the Firebase Oath Package FirebaseAuth.unitypackage So you add the package to the Project and get no warnings. Changes to the Script for FireBase Oath Builds I have attached the script for feedback if you have any time. |
So after todays debugging, I realised that you need to add the Firebase init into your code. void Awake() {
It should more or less work correctly. If you would like I can send you the finished code that you are welcomed to use. Thank you the Project, as it solves a big piece of what has made this whole google Oath so painful for Unity Developers. |
As another note, There is no error that is generated in Unity if FireBase is not initialized correctly. The App will just crash in Android, so the only way to discover the issue was to use the normally adb while watching the Android stack trace and hunt for the message, which for Unity developers, is not what they are expecting. While you are doing a fantastic job at this project (and again thank you so much for doing this SDK) please remember that Unity Developers are in general not up to the same level of software development that you as an Android Expert are used to. They will need to be spoon feed the steps and please think about giving actual completed code when ever possible. Any time you mention "Look at iOS or Android" I believe there eye's will sort of get large and they might panic a bit. |
Thanks for the feedback! I am happy to integrate changes to make things more clear! The sample snippet is definitely out of context - I copied from the testapp from the Quickstart sample for Firebase. Feel free to submit pull requests, especially for documentation if you think it makes it more clear and helpful. |
Fixes & Improvements
CommandInvokationFailure: Unable to convert classes into dex format.
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/chenrick/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -
stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/googlesignin/GoogleSignInFragment;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/googlesignin/GoogleSignInFragment$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/googlesignin/GoogleSignInFragment$2;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/googlesignin/GoogleSignInFragment$3;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/googlesignin/GoogleSignInFragment$State;
Uncaught translation error: java.lang.IllegalArgumentException:
The text was updated successfully, but these errors were encountered: