Unable to install device agent in iOS 13 - xamarin.forms

I tried to run xamarin ui test for iOS, it getting working on my iPhone iOS version 12.
When I tried it with iOS13 getting exception
Xamarin.UiTest.XDB.DeviceAgentException: Failed to install device agent.
I tried multiple xamarin ui test version none of them working.
Currently I am using
Xamarin.UiTest 3.0.7
Nunit 2.6.4
NunitTestAdapter 2.2.0

Definitely a bug in the UITest Nuget package that seems to be recurring since v3.
Have you tried the newer version of the Nuget package: 3.0.8-dev1? It may only be available in the Alpha channel.
I would recommend going here and tapping on "Contact Owners" to report the bug.
To verify that it's not just your issue, you could quite Visual Studio, delete all the bin and obj folders, delete the app from your phone and then try again (or just git clean -fxd if you have a .gitignore file)

Related

The installed package is incompatible in xamarin forms

We are developing a small game application using Xamarin forms in visual studio 2019. When I try to install the app in android tab 6.0 while I am getting an error "The installed package is incompatible. Please manually uninstall and try again.". Please give me a solution to resolve this issue
Note: Previously I unstalled app(Settings->Apps->myapp)
Couple of things to try:
See if updating Xamarin will help
rebuild/clean solution
close VS -> delete the bin and obj folders in your Xamarin Android project-> relaunch
The last step is usually what I have to do when Xamarin complains about having two versions of itself installed in one of my work projects since one of our branches has a brand new .csproj design so it is incompatible with the previous one
After get this Deployment Fail,
Steps=>
Open the Command Prompt in ada.exe
2.Run the adb devices command and after that you can see the listed devices
After that run command adb uninstall then solved the problem 😀

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)

Xamarin.Forms - Xamarin.Forms.Maps broken references in Droid Project

I need to implement Map functionality into an application that I'm building.
And I was folliwing this guide.
I downloaded the package and did all of the configuration.
I haven't implemented the Map class into my project yet, I only did the configuration required for both platforms (Android and iOS).
The Portable project and the iOS project are fine, the problem here is the Android project.
It has some broken references, these ones:
And when I try to compile the Android project, I get this error and these warnings:
Can anybody give me a hand? Thanks in advance.
EDIT:
As a sidenote, I'm using the Sdk installed by Android Studio, and that one has the latest Google Play Services installed.
UPDATE:
I just upgraded the version of my Xamarin.GooglePlayServices one by one (the one listed up there in the first image) for some reason it downloaded a really old version of those. So I just upgraded them, and it seems those references are fine now.
But I still get the error:
The "ResolveLibraryProjectImports" tasks failed unexpectedly.
SOLUTION:
I unloaded the Android project, added this:
<UseShortFileNames>True</UseShortFileNames>
To every property group in the .csproj file.
Load my android project back, and it all worked fine now.

Xamarin.Forms cannot update Xamarin.Forms Package from version 2.3.4.270 to 2.4.0.282

I'm trying to update a project to the newest version of Xamarin Forms and I'm getting an error. The error is the following
Unable to resolve dependencies. 'Xamarin.Android.Support.Design 25.4.0.2' is not compatible with 'Xamarin.Forms 2.4.0.282 constraint: Xamarin.Android.Support.Design (= 23.3.0)'.
Although the error message is obvious, it's strange that the new Xamarin.Forms package needs an older version of Xamarin.Android.Support.Design.
So, I created a new project and I saw that the versions in the new project are:
Xamarin.Forms 2.4.0.282 and Xamarin.Android.Support.Design 25.4.0.2 (!)
That's odd. The new project contains the version 25.4.0.2 Xamarin.Android.Support.Design. The old project rejects the update because it contains that version of Xamarin.Android.Support.Design. Doesn't make much sense.
So, the question is Why, am I getting this error and why I cannot update to the new version of Xamarin.Forms?
Try update your android support libraries first and then update to the latest xamarin forms 2.4.0
You're getting the error because Xamarin does not use latest versions of those android support libraries. You can see that when you install Xamarin.Forms package (Nuget-Manager: update only Xamarin.Forms), if it depends on newer versions of android support packages it will automatically update them.
So basically as long as Xamarin.Forms does not use latest android packages, they will always show 'update available' but when you update them, they're not compatible with Xamarin.Forms anymore.
Edit:
Sometimes it seems deleting packages and bin/obj folders is not enough.
If found this link with instructions for deleting nuget cache.
Fixing Xamarin.Android build errors

Xamarin with Entity Framework Core: Error: unauthorized access to "/system/lib/libsqlite.so" on Android 7

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)

Resources