Closed zeroregard closed 5 years ago
Update: Copying over those .aars from the example project to my own project do not result in any firebase-related .so files showing up in my .apk's /lib/ folders.
Hi @mathiassiig
Based on what you've posted, it sounds like another plugin is causing problems with the resolution of the Firebase libraries. Just to confirm, you have the .srcaar files that should be in Assets/Firebase/m2repository/com/google/firebase/firebase-app-unity/6.2.0?
Top the toolbar, if you go to Assets > Play Services Resolver > Android Resolver, can you see if your settings are different from the default? Also, if you use 'Display Libraries', does the output seem correct?
Finally, when you run the resolver, are there any warnings or errors being logged?
Hi @a-maurice
I did have some files there: firebase-app-unity-6.2.0.srcaar
and firebase-app-unity-6.2.0.pom
Setings are indeed default, but I just enabled verbose logging. No warnings or errors:
Detected Android Gradle Plugin Version 3.2.0.
Reading Android dependency XML file Assets/Firebase/Editor/AnalyticsDependencies.xml
DependOn - group: com.google.firebase artifact: firebase-analytics version: 17.0.0 packageIds: repositories:
DependOn - group: com.google.firebase artifact: firebase-iid version: [19.0.1] packageIds: repositories:
DependOn - group: com.google.firebase artifact: firebase-analytics-unity version: 6.2.0 packageIds: repositories: Assets/Firebase/m2repository
Reading Android dependency XML file Assets/Firebase/Editor/AppDependencies.xml
DependOn - group: com.google.firebase artifact: firebase-common version: 18.0.0 packageIds: repositories:
DependOn - group: com.google.firebase artifact: firebase-analytics version: 17.0.0 packageIds: repositories:
DependOn - group: com.google.firebase artifact: firebase-app-unity version: 6.2.0 packageIds: repositories: Assets/Firebase/m2repository
DependOn - group: com.google.auto.value artifact: auto-value-annotations version: 1.6.3 packageIds: repositories:
Checking for changes from previous resolution...
No changes found, resolution skipped.
I noticed that the universal APK had the .so
files only for it's arm-v7a build
, could it be that something is not correctly resolved with IL2CPP and ABI splitting?
At least the problem is similar in the other issue, https://github.com/firebase/quickstart-unity/issues/398
Yep, had to downgrade to 5.2.1 where it even works with IL2CPP. I guess this issue should get some priority due to the fact that the googles play store will enforce 64bit binaries by the 1st of August.
I didn't manage to downgrade to 5.2.1 successfully. I guess the combination of targeting three architectures, compiling to IL2CPP and using dotnet 4.6 is volatile with Firebase. I started going through this https://groups.google.com/forum/#!topic/firebase-talk/2w1Lk62VIcg but I'm getting
Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors:
Reference has errors 'Firebase.Analytics'.
Assembly 'Library/ScriptAssemblies/Assembly-CSharp-Editor.dll' will not be loaded due to errors:
Reference has errors 'Assembly-CSharp'.
Assembly 'Assets/Firebase/Plugins/Firebase.Analytics.dll' will not be loaded due to errors:
Unable to resolve reference 'Unity.Tasks'. Is the assembly missing or incompatible with the current platform?
Assembly 'Assets/Firebase/Plugins/Firebase.App.dll' will not be loaded due to errors:
Unable to resolve reference 'Unity.Tasks'. Is the assembly missing or incompatible with the current platform?
Assembly 'Assets/Firebase/Plugins/Firebase.Platform.dll' will not be loaded due to errors:
Unable to resolve reference 'Unity.Compat'. Is the assembly missing or incompatible with the current platform?
Unable to resolve reference 'Unity.Tasks'. Is the assembly missing or incompatible with the current platform?
Assembly 'Assets/Firebase/Editor/Firebase.Editor.dll' will not be loaded due to errors:
Unable to resolve reference 'Unity.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?
Assembly 'Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.84.0.dll' will not be loaded due to errors:
Unable to resolve reference 'Unity.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?
Though at this point, this isn't really relevant to the original issue, but I am very much open to any sort of hack to get this working.
We do not use Analytics, so no idea on that front but for the parse SDK you need the special one for .net4x, I just got it from a higher Firebase SDK.
Hi @mathiassiig I had a hard time to reproduce it. I used Unity 2019.1.11f1 and Firebase SDK 6.2.0 with Auth testapp from https://github.com/firebase/quickstart-unity. And I did not see this exception at all.
Could you provide more detail about how to reproduce this exception? Ex. your Unity configuration, which platform did you see this exception, sample project or log. It would be great if you can reproduce it with any of our sample project. https://github.com/firebase/quickstart-unity
Otherwise,there are a couple things you can try:
Please let us know
Just sharing my story. I just had this issue when starting the Unity Android App I got this error: "Unable to find FirebaseCppApp-6.2.1" on startup. My Unity project was set to only build 32-bit and this error came up when I changed the build settings to also build 64-bit and x86. I had to run the Google Play Resolver once more and then everything went smoothly. If you changed your target arch then make sure you get a complete Google Play Resolve before build.
Not sure if this is the whole issue but that worked for me. Unity 2019.1.12f1 Android 8.1.0 Firebase SDK 6.2.1 Google Play Resolver 1.2.122
When I ran into this problem I fixed it by reimporting all of the libraries I used - I think I had a version mismatch (i.e. RemoteConfig was 6.2.X and my analytics was older)
The problem was fixed:https://firebase.google.com/support/release-notes/unity Download new firebase plugin version
Nope. It says in the log it was fixed for 2019.3 and 2019.2, I'm still on 2018.3.2f1, so it's likely a different issue. I'm only using the analytics plugin still.
DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_3_0': The specified module could not be found.
Unity: 2018.3.2f1 Firebase: 6.3.0 Scripting backend: IL2CPP Scripting runtime: .NET 4 Api compatibility: .NET 4.X Target architectures: ARMv7, ARM64, x86
The resolver looks like so
<dependencies>
<packages>
<package>com.android.support:appcompat-v7:25.3.1</package>
<package>com.android.support:cardview-v7:25.3.1</package>
<package>com.android.support:customtabs:25.3.1</package>
<package>com.android.support:support-v4:25.3.1</package>
<package>com.android.support:support-v4:26.1.0</package>
<package>com.google.firebase:firebase-analytics:17.0.1</package>
<package>com.google.firebase:firebase-analytics-unity:6.3.0</package>
<package>com.google.firebase:firebase-app-unity:6.3.0</package>
<package>com.google.firebase:firebase-common:18.0.0</package>
<package>com.google.firebase:firebase-iid:[19.0.1]</package>
</packages>
<files />
<settings>
<setting name="androidAbis" value="arm64-v8a,armeabi-v7a,x86" />
<setting name="bundleId" value="fi.ThreeDBear.ThreeDBearAR" />
<setting name="explodeAars" value="True" />
<setting name="gradleBuildEnabled" value="True" />
<setting name="gradleTemplateEnabled" value="True" />
<setting name="installAndroidPackages" value="True" />
<setting name="packageDir" value="Assets/Plugins/Android" />
<setting name="patchAndroidManifest" value="True" />
<setting name="patchMainTemplateGradle" value="True" />
<setting name="projectExportEnabled" value="False" />
<setting name="useJetifier" value="True" />
</settings>
</dependencies>
@mathiassiig you need remove aars manually and make force resolve. I have same issue and it helped me.
@ivk1800 can you please give more information about that. I'm also getting same error
E Unity : Unable to find FirebaseCppApp-6_4_0 E Unity : DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_4_0': The specified module could not be found. E Unity : at Firebase.AppUtilPINVOKE+SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_AppUtil (Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate applicationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate arithmeticDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate divideByZeroDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate indexOutOfRangeDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidCastDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidOperationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate ioDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate nullReferenceDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate outOfMemoryDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate overflowDelegate,
Please fill in the following fields:
Unity editor version: 2018.3.2f1 Firebase Unity SDK version: 6.2.0 Firebase plugins in use (Auth, Database, etc.): Analytics Additional SDKs you are using (Facebook, AdMob, etc.): Facebook, Branch, 8th Wall Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac Platform you are targeting (iOS, Android, and/or desktop): Android + iOS
Please describe the issue here:
I'm building for Android, and the app crashes instantly with the DllNotFoundException mentioned in https://github.com/firebase/quickstart-unity/issues/398 and https://github.com/firebase/quickstart-unity/issues/395
I exported the project and noticed that no libraries from firebase are in the libs folder. I did run the newest version of the play services resolver:
This looks good to me. It did however not change my mainTemplate.gradle, if that was supposed to happen? This looks like so:
I'm building to ARMv7, ARM64 as well as x86. I'm also using .NET4 and the scripting backend is set to IL2CPP.
I'm not very experienced when it comes to the process of turning DLL's into libs compatible with Android. In which phase is this controlled? That might give me some insight into what is different in this project.
Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
No, the issue couldn't be reproduced in the quickstarts project. I took the test project, opened the analytics project and fed it the newest (6.2.0) version of Firebase.
Here's the Android Resolver Dependencies for that project:
Running the resolver in this project actually gives me a bunch of com.google.firebase .aars in my Plugins/Android folder. I'll try copying them over to my own project and see if that works for now, but it would be nice if the resolver worked in my own project as well!
I already spent hours and hours (every build takes 30 minutes) trying to resolve the issue, so any insight is very appreciated!