Does Autofindviews supports Android 11? - android

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

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.

Related

Unresolved reference: iosSimulatorArm64

I got a blocker when trying to convert existing simple android app writing in kotlin to KMM.
Below is the following error.
Please initialize at least one Kotlin target in 'kmmsharedmodule (:kmmsharedmodule)'.
Read more https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets
Unresolved reference: iosSimulatorArm64
I read the documentation provided in the link but seems not a direct solution to what i wanted.
The process i took was just by adding KMM module through provided support in android stuido.
I've looked for others sources but i couldn't find any related problems
Update your compose version to 1.0.3 then you can set Kotlin Compiler Version to 1.5.30 . Now iosSimulatorArm64 will work fine as it was introduced in version 1.5.30

Android Studio cannot render FloatingActionButton

I'm just now learning how to develop in Android Studio and this error come up when I began my helloworld tutorial:
Rendering Problems The following classes could not be instantiated: - android.support.design.widget.FloatingActionButton
The exception details are:
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1080029
I'm using version 23.2.0 of the Android Support Design library.
How can I get the FloatActionButton to render in the preview pane?
Look at the error stack trace generated by the previewer. It says it cannot find a drawable resource by id 0x1080029. Does a drawable exist by that ID? Are you supplying an invalid ID? On my system it appears resources start at 0x7f010000.
Also found this: Android Studio FloatingActionButton error. It says there could be a bug in version 23.2.0 of the support design lib and that downgrading to 23.1.0 fixes it.
Upgrade to Android Support Library version 23.2.1 resolves the issue. It's already available in Android Studio SDK manager.
There appears to be a bug in version 23.2.0 of the Android Support libraries; simply downgrading to 23.1.1 and rebuilding your project should make the problem disappear.
Note that the problem is not just in the Design library; also the AppCompat widgets cause problems for AppCompatButton and AppCompatImageButton also give similar errors reporting missing resources.

Compiling and using AppCompatActivity in Eclipse

I have the latest Android Support Library, Android Support Repository and Google Repository (Rev. 23.1, 24, 22 respectively) and working with Eclipse Mars.1(4.5.1)
In the process of giving a make-over to an existing app, I am trying to import the v7.AppCompatActivity library, closing all other projects in workspace and silent prayers. ( ;-) )
Observations:
I daresay I have been unsuccessful even after following the instructions here to the dot.
Ian Lake's blog looks all hunky-dory, but Utopian.
Reading up tons of excellent answers on SO did not yet help. No matter what target is set in the project.properties page or what Build Target is set in the Eclipse Project Properties dialog - just cannot seem to get rid of this (and very similar) compile error(s):
android-support-v7-appcompat\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Going by the number of similar questions, I am surely not alone. Pray, can someone kindly throw some light on how to import the v7 support library without going insane?
Thanks in advance!
None of the answers or blogs pointed out the following, except #pkuszewski.
The above issue resolves on
upgrading to Android 6 Marshmallow API 6.0 with the SDK manager
setting the Build Target for the AppCompat project to Android 6.0
Did I hear, "Duh"? :)
Thanks, #pkuszewski!
SDK Manager fragment looks like this, post the fix:

Imported type defined multiple times on Xamarin Android

I'm getting the following error in my Xamarin.Android project:
The imported type Android.Support.v4.view.ViewPager is defined multiple times
I found this solution, but doesn not work. In fact I need to use the Google Play Store binding library and it uses both support v4 and v7. If I try to remove the v4 I get an error like this:
Unable to uninstall 'Xamarin.Android.Support.v4 20.0.0.4' because 'Xamarin.GooglePlayServices 19.0.0.1' depends on it.
ps: I'm using Facebook Android SDK and Crittercism components
The only working solution I found is the following:
remove the Xamarin.GooglePlayServices package (and its dependencies)
remove the Facebook component
install the Facebook component first
then install again the Xamarin.GooglePlayServices package
I don't know why this process is required, but it works

How to make Android GridLayout compatible to older version?

New GridLayout for Android 4 is good. Both in terms of code maintainability and performance.
I wanted help with backward compatibility for GridLayout for older version. Waiting for official compatibile package is taking too long. I know its possible and someone did mention that this could be done by copying the class from version 4 platform source.
Would be really great if anybody could guide me how to do this.
For reference please check this post on Google Plus
https://plus.google.com/105051985738280261832/posts/KbqAxUQTzVf
A better way of doing this is using Android Support Library.
Since resource files are also involved it cannot be included as .jar library.
Update the android SDK and support files.
Add your-android-sdk\extras\android\support\v7\gridlayout project to eclipse.
Make the project as library.
Add this library project to your working project.
To use gridlayout in XML use it like this
<android.support.v7.widget.GridLayout> </android.support.v7.widget.GridLayout>
Hope that was helpful.
Check out this project: https://github.com/dlew/android-gridlayout

Categories

Resources