'Does Autofindviews supports Android 11?
I am looking for answers related to Autofindviews nuget and its compatibility.
As per this link [AutoFindViews Nuget] (https://www.nuget.org/packages/AutoFindViews/) under framework I could see they mentioned the product version as MonoAndroid10.
- Does that mean this nuget will support for Android projects targeting till Android10?
- If it supports till Android 10, I am facing an issue where it gives below error while trying to migrate the Xamarin.Android project from Android 9 to Android 10 (Where the packages are updated to AndroidX and Support widgets in layout files are changed to androidx )
Error CS0246 The type or namespace name 'Androidx' could not be found (are you missing a using directive or an assembly reference?)
Can anyone please help me understanding this? Thanks in Advance
Solution 1:[1]
Bro, at Google I/O 2018, the Android team announced AndroidX, but the Autofindviews nuget which is just used to replace the FindViewById method last update at the 2017. So It can't find the view in the AndroidX library.
So you can try the three solution :
- Remove the reference of the Autofindviews nuget and do the FindViewById by yourself.
- Have a mixed use between the Support Library and the AndroidX Library. Only use the view which belongs to the Support Library in the xml. You can also use Support Library in the Android 10.
- Try to use another nuget package, such as xamarin.androidx.viewbinding.databinding 4.1.2.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Liyun Zhang - MSFT |
