My build.gradle is:
// for facebook account kit
compile 'com.facebook.android:account-kit-sdk:4.+'
// for google firebase database
compile 'com.google.firebase:firebase-database:9.6.0'
// for google firebase cloud messaging
compile 'com.google.firebase:firebase-messaging:9.6.0'
After rebuild project,a error happens.
Error:(74, 27) error: Cannot access AbstractSafeParcelable
Cannot find
com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable class
==============================================
Resolution:
The reason is that after rebuilding the project, gradle download the latest version of "account-kit-sdk" to 4.25.0, the new version changes some about gms, so make some conflicts with firebase messaging,
So I downgrade the account-kit-sdk version, change import version from "account-kit-sdk:4.+" to "account-kit-sdk:4.24.0"
Then the issue has been resolved.
But I think it is not the best resolution about this problem.
Welcome friends add some new ways to resolve this issue.
Thanks.
Version 4.25.0 of com.facebook.android:account-kit-sdk has a dependency on com.google.android.gms:play-services-auth-api-phone:11.0.1 that is not present in version 4.24.0. com.google.android.gms:play-services-auth-api-phone adds many transitive dependencies on other com.google.android.gms modules, including base, basement, tasks, auth, and auth-base.
The Firebase libraries also have transitive dependencies on numerous com.google.android.gms modules. If the version numbers of all of the Firebase and Play Services modules in a build are not the same, problems such as this one occur.
A simple solution is to use version 11.0.1 of all Firebase and Play Services libraries you list in your gradle dependencies:
// for google firebase database
compile 'com.google.firebase:firebase-database:11.0.1'
// for google firebase cloud messaging
compile 'com.google.firebase:firebase-messaging:11.0.1'
You should also specify a fixed version number for the Facebook library to make your build predictable and repeatable:
compile 'com.facebook.android:account-kit-sdk:4.25.0'
The risk of specifying the version as "4.+" is that when a new version is released that has transitive dependencies on a new version of the Play Services libraries, the new Facebook lib version will be automatically used and your build will break again.
To debug problems like this one, you can open the Gradle window in Android Studio and double-click on :app -> Tasks -> android -> androidDependencies to generate a dependency tree. The tree can then be examined to find version mismatches.
Related
Crashlytics could not find the resource file generated by Google Services.You may need to execute the :processGoogleServices Task
i read the solution from this qusetion Crashlytics could not find the resource file generated by Google Services. You may need to execute the :process<Variant>GoogleServices Task
but i didn't succeded to run this command in my unity project
./gradlew :app:processProdReleaseGoogleServices or ./gradlew :app:processDevReleaseGoogleServices
how can i run it?
A tricky bit with the Unity SDK is that because Firebase still supports versions of Unity that predate a total move to gradle (I believe 2019.4 is when Unity switched over entirely, the earliest supported version right now is 2017.4), many Android specific solutions (such as the one you linked) won't function. If you did want to try it, you can select "Export Project" in your build settings -- but I don't think this will help:
It sounds instead like you're missing Plugins/Android/FirebaseApp.androidlib or Plugins/Android/FirebaseCrashlytics.androidlib. These are generated by the Firebase plugins (obviously FirebaseCrashlytics.androidlib is specific to Crashlytics -- you won't see that one otherwise) as part of a processing step to simulate what the Play Services gradle plugin would do in a typical Android application or game.
Some things to try:
Make sure you're on a supported version of Unity (2017.4 or newer -- Firebase does not officially support alphas or betas).
Ensure that you have a valid google-services.json file added and that Crashlytics has been added to your backend (full instructions here to redownload).
Re-add FirebaseCrashlytics and ensure that you leave everything checked.
Ensure that you have the latest Crashlytics plugin (currently 7.1.0). You can download just Crashlytics now from this site, but make sure you don't mix and match versions with other Firebase plugins.
And if none of these work, sometimes small changes in build environments expose unexpected issues. Your best bet will be to file an issue here with everything you've tried.
I have an SDK that uses C++ code. The SDK exports 4 different modules in a maven repo that I publish on either a local maven repo or on GitHub packages.
The apps that consume the SDK should be able to use Firebase Crashlytics and get reports of crashes in the native code as well.
The first problem I have is that I need to provide to the Firebase plugin the folders unstrippedNativeLibsDir and strippedNativeLibsDir:
firebaseCrashlytics {
nativeSymbolUploadEnabled true
unstrippedNativeLibsDir "???"
strippedNativeLibsDir "???"
}
If I go to the project where I build the SDK I can see: build/intermediates/merged_native_libs/release and build/intermediates/stripped_native_libs.
Are these the unstripped and stripped folder respectively?
Is there any documentation about what exactly those folders are supposed to contain?
Anyway if I configure the app firebaseCrashlytics to point to these folders I still need to fix another issue.
I get:
Crashlytics could not find NDK build tasks on which to depend. You many need to manually enforce task dependencies
It looks like since I'm building the libs that use the NDK in another project, then the Firebase plugin does not work.
What am I supposed to do?
Is it possible to get the Crashlytics NDK working even if I build the libraries independently with a separate project?
The only way I made it work was to build the libraries along with the app. The libraries were in separate repos anyway but I included them as sub-repositories in the app.
In this way, you solve the issue of not finding NDK build tasks on which to depend.
I know this is not the answer though
I'm using Unity 2019.3.4f1 and Firebase Package 6.15.2 and when I import the Custom Package the Package Manager Resolver asks to change the "/manifest.json".
When I click "Add Selected Registries", Unity starts to Uninstall the packages and stay on its hours with this message: "Uninstalling the following packages: Firebase Authentication"
Package Manager Resolver
I can't deploy or play the game without this message appears.
What you're running into is that newer versions of Unity support a package manager that makes it easier to install and manage dependencies. Newer versions of the Firebase SDK can optionally take advantage of this.
I can't quite tell what your specific issue is, but there are a couple routes forward.
The simplest is to just click "Disable Registry Edition." If you don't feel like messing with this system at all, just click this button and work with Unity packages as you're probably expecting.
Otherwise, you can click "Add Selected Registries." This will kick off a somewhat complex process where:
The Firebase plugin adds a "Scoped Registry" to Unity (this is that code you see in the "After" pane). This tells Unity about Google's package repository.
The Plugin then looks for any package that is included in the registry and uninstalls it to avoid having it included twice.
The Plugin adds the package it uninstalled to your package manifest. This lets you maintain and update the Firebase plugin right in Unity with the "Package Manager" window:
There are plenty of reasons why you'd want to do this. First, the Firebase Unity SDK is HUGE on disk -- much larger than the SDK is even in your project. The reason is that it has redundant copies of every Firebase library for both legacy .NET3 projects and for modern .NET4 projects. Each unitypackage also has to include all of its dependencies -- that means that FirebaseCore is redundantly included in every unitypackage.
Second, what gets me the most, is that the Firebase plugin is too big to fit into a GitHub repo without Git LFS. This is because one or more of the libraries needed to support Linux is larger than a single source file can be. When you use the package manager, this stuff is kept out of your source repository (if you don't commit the Library/ directory, which you shouldn't) keeping your size in the cloud down and making this workaround unnecessary.
Third, as illustrated in the screenshot I included above, it's just easier to upgrade and downgrade the Firebase SDK as needed when you use the package manager. You no longer have to try to remember which Firebase libraries you've installed, you can see them in a neat list! You can also easily uninstall Firebase features that you don't need without worrying too much about large dependencies laying around (you still have to manually clean up some native plugins).
You can also perform all of this manually! Instead of downloading the Unity SDK, you can manually perform the steps as outlined here. Namely you can add:
"scopedRegistries": [
{
"name": "Game Package Registry by Google",
"url": "https://unityregistry-pa.googleapis.com",
"scopes": [
"com.google"
]
}
]
to the end of your Packages/manifest.json as indicated in that popup window. Then install and manage the Firebase plugin that way without worrying about migration at all.
EDIT:
I also should mention that if you do think that you're running into a bug, the system responsible for the dialog you're seeing is known as the "External Dependency Manager for Unity." You can file issues directly on its GitHub page.
I'm new to Google Firebase and wanted to do some sample app.
But after import External Dependencies Manager (EDM) and Firebase Core from Package Manager, it gave me GUID errors, example the image below.
Error log
I do hope Firebase or Unity3d expert able to help me with this.
I'm using Unity3d 2019.3.13f1 and Firebase SDK 6.14.
It looks like you may have run into an issue similar to this one. If you installed via a UnityPackage and said "yes" to installing EDM4U:
You'll want to double check that you've followed the instructions here.
To summarize:
EDM4U provides a tool to uninstall managed packages which is accessible using the Assets > External Dependency Manager > Version Handler > Uninstall Managed Packages menu option. Select all Firebase SDKs as well as External Dependency Manager and click Uninstall Selected Packages.
Alternatively you can also remove the SDK manually from Assets folder.
So if you've installed the package repositories, you'll want to make sure that you remove from your Assets folder:
Firebase
Parse
PlayServicesResolver
ExternalDependencyManager
Editor Default Resources/Firebase
Plugins/Android/Firebase
Plugins/iOS/Firebase
Alternatively, if Unity Package Manager integration isn't for you, you can remove the installed registries:
You may want to re-install the Unity Package afterwards as well in case they'd been partially uninstalled.
This is a bit of a shot in the dark, but I hope it helps!
--Patrick
I am getting the Version Mismatch with JavaScript version at 0.53.3 and Native sitting at 0.50.4.
Ran watchman watch-del-all as instructed and re-run react-native run-ios again with no luck. Also did cd ios && pod install for many times each time showing Pod installation complete! There are 11 dependencies from the Podfile and 25 total pods installed..
Have found solutions about the Version mismatch which most of them are Native higher than the JavaScript so updating package.json would work. However, how may I update the Native so that it matches the JavaScript Version?
I am not currently using Expo.
Regarding "downgrade RN", I updated as there was a Firebase [[DEFAULT]] problem and one of the suggested fix is to update RN (re-downloading GoogleServices-Info.plist didn't help). Thus I am looking for instructions for keeping RN at this version.
The issue of mismatch is related to the changing of your react-native version without properly updating peer dependencies and native projects.
Since you aren't using Expo, try following the upgrade guidelines here offered from Facebook.
Upgrading to new React Native versions
Found under.. "Projects built with native code"
I personally found success using the "Alternative" steps, and then confirmed my project
** BUILD SUCCEEDED ** correctly by both...
on the console using react-native run-ios
and then from within Xcode