"System.TypeInitializationException:
An exception was thrown by the type initializer for Firebase.Analytics.FirebaseAnalyticsPINVOKE --->
System.TypeInitializationException: An exception was thrown by the type initializer for SWIGExceptionHelper --->
System.DllNotFoundException: App"
Is thrown on Android when the libApp.so (which is basically a native DLL on Linux derived OSes like Android). We ship a separate native library on each platform, we treat Android a little differently as we utilize the Jar Resolver to pull in the appropriate native library dependent upon your target ABI.
libApp.so is shipped in firebase-app-unity-X.X.X.aar which should be copied into your Plugins/Android directory by the Play Services Resolver and picked up by Unity's build process.
e.g in one of my development projects:
$ unzip -l ~/dev/tmp/unity_test/messaging/client/unity/testapp/Assets/Plugins/Android/firebase-app-unity-3.0.1.aar
Archive: /Users/smiles/dev/tmp/unity_test/messaging/client/unity/testapp/Assets/Plugins/Android/firebase-app-unity-3.0.1.aar
Length Date Time Name
--------- ---------- ----- ----
343 03-15-2017 00:22 AndroidManifest.xml
0 03-15-2017 00:12 R.txt
22 03-15-2017 00:22 classes.jar
0 03-15-2017 01:31 jni/
0 03-15-2017 01:31 jni/armeabi-v7a/
1035900 03-15-2017 00:22 jni/armeabi-v7a/libApp.so
0 03-15-2017 01:31 jni/x86/
1184528 03-15-2017 00:12 jni/x86/libApp.so
1414 03-15-2017 00:22 proguard.txt
--------- -------
2222207 9 files
You can verify the Play Services Resolver (
Jar Resolver) is enabled by checking "Enable Auto-Resolution" under the "Assets > Play Services Resolver > Android Resolver > Settings" menu item.
Cheers,
Stewart