I'm trying to add Firebase authentication to my app. I've gone through the process of linking firebase with my app, but when I get to Step 4.6 and try running my app with the Firebase plugins installed, I get the following error:
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.0.2\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated A
PI.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_analytics-7.1.1\android\src\main\java\io\flutter\plugins\firebaseanalytics\FirebaseAnalyticsPlugin.java uses or overrides a depre
cated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-1.0.1\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.java uses or overrides a deprecated A
From what I understand, I need to wait for the Firebase team to update their plugins before I can use them with the latest version of Flutter
Flutter 2.0.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8962f6dc68 (2 weeks ago) • 2021-03-11 13:22:20 -0800
Engine • revision 5d8bf811b3
Tools • Dart 2.12.1
Does anyone know the latest stable build that the Firebase API works on? These particular errors don't stop the build from completing, however if I try to use the playstore plugin, for example, it crashes the build script. For now I'll try to find a compatible stable build myself. I'll update this post when I find it.
Latest stable flutter build is 2.0.3. Many Firebase plugins have been migrated already to null-safety. Everything is working as a charm for me while using latest versions of dependencies for Firebase from Pub.dev, even for flutter web.
I think it might be something in the play-store plugin implementation however.
Related
I am updating a small application for iOS 12+. I updated the CocoaPod list to use the latest Firebase tools but I am unable to compile because GoogleDataTransport has a file that still references a deprecated method:
Line 129: [NSKeyedArchiver archiveRootObject:self toFile:[GDTCORStorage archivePath]];
It seems the pod is already up to date so I'm not sure how I'm supposed to get around this. Has anyone had the same problem?
Update to at least Xcode 10.1.
Recent versions of Firebase run into this issue with earlier versions of Xcode.
Here's the solution that worked for my case
Xcode 12.5 version
clean derived data
re-open project
update the platform ios target to iOS 12 in a pod file
run pod install
re-launch your project
The reason for depricate errors is because firebase SDK set iOS 12 as the minimum target requirement, but in my pod file, I put iOS13.
We are going to use Firebase C++ SDK for multiple projects, but we are not using cocoapods so we are manually downloading the Firebase SDKs as pointed out in the documentation from here:
https://firebase.google.com/docs/ios/setup#frameworks
https://firebase.google.com/docs/cpp/setup#available_libraries
The Firebase readme file from the downloaded C++ SDK (readme.md) states the following:
Important: Each version of the Firebase C++ SDK supports a specific version of the Firebase iOS SDK. Please ensure that you reference the Cocoapod versions listed above.
The download link from the documentation doesn't have multiple links for each version.
Edit: modified text and images with correct versions
Is there a place where we can download specific versions of the SKDs?
How can we make sure that the download versions are compatible with each other?
Just downloaded both sdks and from the readme:
- C++ SDK is version 5.6.1 and requires Firebase/Core Cocoapod (5.20.0)
- Objective-C SDK has Firebase version 5.20.2
The Objective-C library is a bigger version then requirement of the C++ one (5.20.2 > 5.20.0) but is this property enough to assure compatibility?
See below images for readmes:
readme.md - C++ SDK
README.md - Objective-C SDK
First off it seems that Google forgot to make a branch for the iOS version 5.20.2 (on git currently only this exists: https://github.com/firebase/firebase-ios-sdk/tree/release-5.20.0 )
Considering that only the last number was incremented, let's assume there aren't big changes between the two versions, so we can check 5.20.0.
Your issue is that in the C++ SDK's readme for the iOS part they don't specify exactly the obj-c counterparts but the pods version. You can use the pods files though to check if the versions correspond.
For example we can check "Firebase Auth": in the C++ SDK says that it uses the 5.20.0 pod for ios, which is this one: https://github.com/firebase/firebase-ios-sdk/blob/release-5.20.0/FirebaseAuth.podspec
FirebaseAuth.podspec
We can see in the file that the version of Firebase Auth for the obj-c 5.20.0 SDK is 5.4.2, as it is in your readme.
You can do the same for all necessary services to make sure the compatibility is maintained.
I have no idea unfortunately if you can check this in an automatic way.
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
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.
Im trying to create a Xamarin Forms App using the new Entity Framework Core. The app targets android 6.0 but my Emulator is running Android 7.0. I installed the following related Nuget packages on the android project:
Microsoft.EntityFrameworkCore --> 1.1.1
Microsoft.EntityFrameworkCore.Sqlite --> 1.1.1
When accessing my DbContext on Android a message will pop up telling: Detected problems with native libraries unauthorized access to "/system/lib/libsqlite.so".
This Xamarin forums thread suggests, that it's due to the native SqLite binaries are no longer supported (on Android 7?) and the common fix seems to be to switch to the SqLite.Net PCL.
However as Microsoft.EntityFrameworkCore.Sqlite depends on Microsoft.Data.Sqlite which in turn depends on the native SqLite package I cannot just replace this (or can I?)
Strangely enough, despite of the error message suggesting otherwise, the data access seems to work. At least migrations run and repeated writes to the database will create new Ids.
Of course I could just scrap EF Core but I guess a lot of people are looking into using it for Xamarin in the future. So it would be nice if anyone would find/know a fix.
I had the same problem. I have fixed this using the following libs: sqlite-net-pcl (version 1.2.0), SQLitePCLRaw.bundle_green, SQLitePCLRaw.core, SQLitePCLRaw.lib.e_sqlite3.android, SQLitePCLRaw.provider.e_sqlite3.android.
Matheus Souza had the right idea there. However installing SQLitePCL is only part of the answer. Here is how I eventually solved this:
DISCLAIMER: This is a kind of "You can do it but it isn't pretty"-solution. If you have the time, it's probably best to wait for the official Microsoft.EntityFrameworkCore.Sqlite 1.2.0 release.
This issue brought me on the right track. The new (unreleased) version of EntityFrameworkCore no longer uses the native sqlite binaries, but sqlite-net-pcl. This is the steps I followed to install it:
Add the aspnetcore-dev branch to your nuget feeds. Nuget 3: https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json
Check "Show preview versions" in Nuget and update (or reinstall) all EntityFrameworkCore packages to "1.2.0 - preview"
(Make sure your x64 is checked in your android projects advanced build options, if the app instantly crashes on deploy. This might be unreleated)