How to migrate AndroidX to Android? - androidx

Because some cause,I must migrate AndroidX to Android many times(not Android to AndroidX!).Is there some easy way to solve it?one by one modify is not very convenient,even if it works.
Thank you for your help.

Just change your androidx dependency to use android.support library

To migrate from androidx to android.support.
Set your compileSdkversion and targetSdkversion to
28.0.0:
Because it was the last feature release under
android.support packaging and it makes migrating
between compat and androidx a one step process.
Remove the properties below from your gradle.properties
file:
android.useAndroidX=true
android.enableJetifier=true
Upgrade you android studio to a version 3.2 or higher.
So you can: Go to Refactor> Migrate to AppCompat.

Related

I can't change my pom.xml in my CodeNameOne Project

AT the moment I'm trying to add the SDK Dependency from Firebase to my CodenameOne Project (pom.xml) but I cannot change that file because it is blocked. How can I add the Dependency to my Project?
We don't block adding dependencies but adding a Firebase dependency won't work since this isn't Android. Firebase is a native android dependency, it won't work on iOS etc.
You can add it in the native pom for Android and could probably use cocoapods for iOS support but this would require writing native code and probably not worth the hassle.

Is Corda's gradle version requirement a minimum?

Part of the upgrade steps for moving to Corda open source 4.3 are to use Gradle 5.4.1 https://docs.corda.net/docs/corda-os/4.3/app-upgrade-notes.html#step-2-update-gradle-version-and-associated-dependencies
Does Corda require this precise version of Gradle or can a later version be used. For example: could 5.6.4 be used instead?
If later versions of Gradle can be used how can developers know what maximum version of Gradle is compatible with Corda?
You should be able to use Gradle 5.6.4 with Corda, although nothing higher as the Gradle plugin for Kotlin 1.2.71 is incompatible with Gradle 6.x.
Corda is currently constrained to use Kotlin 1.2.x both by its dependence on Quasar and by a change to Kotlin byte-code that was introduced in Kotlin 1.3.40. We are working to resolve this.

How to resolve dependencies and target framework for Xamarin.Firebase.Messaging nuget package which couldn't be installed

I want to implement Push Notifications in Xamarin.Forms.
It appears I need to use the NuGet package Xamarin.Firebase.Messaging - as referenced, for example, in this tutorial:
https://www.youtube.com/watch?v=le2lDY22xwM&t=1s
However, if I try and add this package to a vanilla Xamarin.Forms app, I get this error:
Package Xamarin.Firebase.Messaging 71.1740.0 is not compatible with netstandard2.0
I found this about this error, it's 2 years old but isn't really helpful:
https://forums.xamarin.com/discussion/86307/xamarin-firebase-not-compatible-with-forms
I also can't comment on that post as the login appears to be broken.
How can I fix this error? (as an aside if anyone has a better suggestion for sending cross platform notifications in Xamarin.Forms I welcome it, I've tried AppCenter.ms but couldn't get that working either).
Thanks.
I would recommend you to follow this tutorial here.
You don't need to to install specifically version 71.1740.0. You can just install version 60.1142.1 and it works too.
This issue is mainly caused because of dependencies to Xamarin.Android.Support nuget packages and the Target Framework in your Android project.
On this page you can find all dependencies related to Xamarin.Firebase.Messaging nuget package. If you go through dependencies of version 71.1740.0 you find that you need to set Target Framework to Android 9 in your project. See picture bellow.
To install latest Xamarin.Firebase.Messaging into Xamrin.Forms vanilla project you just need to change this Target Framework to Android 9.
However, if I try and add this package to a vanilla Xamarin.Forms app, I get this error: Package Xamarin.Firebase.Messaging 71.1740.0 is not compatible with netstandard2.0
According to your description, you only install this package into a Xamarin.Android project as there are no targets for this NuGet package to install into a PCL.
Look at the "Dependencies" on NuGet,In this case, only MonoAndroid90 is supported. This is synonymous with Xamarin.Android targeting API 28 minimum. So please check Compile using Android version:(Target Framework) and Target Android version is Android 9.0.

Cannot compile iOS app with Firebase because of deprecated NSKeyedArchiver archiveRootObject

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.

Sdk is missing the Android Support Repository

I'm trying to make a app with Gluon mobile but i'm not able to make the Android version work.
I try to download the SDK directly from android but the SDKManager will not open.
After some research I find that SDKManager is not support anymore.
I install Android studio, but the Support Repository is now obsolete.
Anybody know how I can make it work?
I change my JavaJDK to 1.8 instead of java 11 or 12 but still nothing.
Thanks
Jc
The Gluon Plug-in won't deploy to Android with gradle task androidInstall as the Android SDK is missing "Android Support Repository" which is no longer available with current versions of Android Studio, but the androidInstall gradle task console-log outputs a DOS command-line showing how to download it.
Something like:
C:/Users/.../Android/Sdk/tools/bin/sdkmanager "extras;android;m2repository"
(the above is described in the link mentioned earlier by José Pereda)

Resources