Comments (13)
Fixed.
Tagging for new preview!
from androidx.
If this is possible under Xamarin rule (running java 8 underneath) we should simply switch from annotation processing based lifecycle to java8 variant that uses default method implementations. We need to move from androidx.lifecycle:lifecycle-compiler:
package to androidx.lifecycle:lifecycle-common-java8:
and replace all LifecycleObserver with DefaultLifecycleObserver remove the annotations and only implement lifecycle methods that we need. No need for annotation magic.
from androidx.
Hey, I was able to use the annotations by simply adding a custom OnStart
and OnStop
annotation that references the updated androidX package. It works! Anyone facing the same problem can check the workaround here: https://github.com/toggl/mobileapp/commit/ec70d8c00dd3e1d8b067e81f2eec21a5fc167416
from androidx.
We need to update the types here: https://github.com/xamarin/AndroidX/blob/master/source/androidx.lifecycle/lifecycle-common/additions/Additions.cs
from androidx.
@daividssilverio
Please can you provide feedback?
from androidx.
Sure thing, I'll try it later today.
from androidx.
@moljac I've updated our repo to target the preview06
version of the androidX packages and the correct reference seems to be there for the annotations. But I can't build the application anymore on that version.
I'm currently getting this error during build time:
Xamarin.AndroidX.Migration.targets(131, 9): Could not find 2 Android X assemblies, make sure to install the following NuGet packages:
- Xamarin.AndroidX.Arch.Core.Runtime
- Xamarin.AndroidX.Collection
You can also copy-and-paste the following snippet into your .csproj file:
<PackageReference Include="Xamarin.AndroidX.Arch.Core.Runtime" Version="2.0.1-preview02" />
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.0.0-preview02" />
The instructions don't make sense to me... why would I use -preview02
only for those two libs?
Here's the test branch that produces that error: https://github.com/toggl/mobileapp/tree/doivid/test-updated-androidx-nuget-packages
from androidx.
The instructions don't make sense to me... why would I use -preview02 only for those two libs?
Spot on. Not sure why -preview02
!?!!??
Checking sample. Thanks
from androidx.
@daividssilverio
Regarding the sample app:
- Why mixture of Android.Support and AndroidX?
- Which version of Xamarin.AndroidX.Migration do you use?
Never mind. I'll find that out.
from androidx.
Glad you asked. We've followed the guide on https://devblogs.microsoft.com/xamarin/androidx-for-xamarin/
And, yes, I've tried removing the Android.Support
libs, but the GoogleServices/Firebase
related libs adds them all back!
The Xamarin.AndroidX.Migration
does some "magic", right? It should remove the support libs and others during the build. We are using preview-06
in the test branch I've sent you.
In our develop
branch we are using preview-02
.
from androidx.
but the GoogleServices/Firebase related libs adds them all back!
That's the problem. We haven't published GPS-FB stuff that depend on AndroidX. Not even preview.
OK. Alles klar (all clear).
from androidx.
@daividssilverio Feedback would really be nice and appreciated. Thanks
from androidx.
I believe this is fixed and released in preview. If you still have problems with this, please open a new issue.
from androidx.
Related Issues (20)
- [Bug] `androidx.credentials` null Exception HOT 6
- com.android.tools.r8.ResourceException: com.android.tools.r8.internal.vc: I/O exception while reading HOT 3
- AndroidX.Credentials ICredentialManagerCallback wrong parameter types. HOT 2
- Can't get past `javac: error: package androidx.fragment.app does not exist` HOT 4
- CameraSelector.Builder().AddCameraFilter effectively unusable (cannot select specific camera lens) HOT 2
- Xamarin.AndroidX.Biometric not building starting at version 1.1.0.17 (.NET MAUI) HOT 3
- Issue with CustomTabsActivityManager and multiple activities HOT 3
- Bind "androidx/emoji2/emoji2-picker" HOT 2
- Announcement: Xamarin.Android and .NET 6/7 no longer supported
- "Specified cast is not valid" when using SetOnItemSelectedListener of NavigationBarView HOT 6
- `Xamarin.Jetbrains.Annotations` namespace clash with `JetBrains.Annotations` causes CS0433 build failure HOT 1
- Can't install Xamarin.AndroidX.AppCompat and RecyclerView latest versions into Xamarin project HOT 2
- androidx.profileinstaller.ProfileInstaller.writeProfile java.lang.ClassNotFoundException: Didn't find class "com.google.common.util.concurrent.ListenableFuture" on path: DexPathList HOT 6
- Announcement: .NET 7 no longer supported HOT 1
- Bind AndroidX.ViewPager2 1.1.0 HOT 3
- error CS7069: Reference to type 'ILifecycleOwner' claims it is defined in 'Xamarin.AndroidX.Lifecycle.Common', but it could not be found HOT 1
- Still unable to use Xamarin.AndroidX.Emoji2.EmojiPicker
- Error running `api-diff` on `Xamarin.AndroidX.Car.App.App`
- after installation Xamarin.AndroidX.Work.Runtime 2.9.0.4 its giving error androidx.collection.ArrayMapKt on building the project in Visual Studio Community 2022 for Mac Version 17.6.9 HOT 2
- Recycler view (and other androidx controls) shows error in .xml preview HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidx.