неділя, 29 липня 2018 р.

xamarin-forms-android-linux-tools :: emulator path

If you have this message:

PANIC: Missing emulator engine program for 'x86' CPU.

The newest versions of SDK have a new path

${ANDROID_SDK}/emulator
instead of ${ANDROID_SDK}/tools

https://stackoverflow.com/a/50118004

пʼятниця, 20 липня 2018 р.

funny :: a-no-debugger-land

I have working almost a year on a Xamarin.Forms project where on Linux platform I don't know how to run a debugger. Now I have returned back to the Android, but now I tend to avoid the debugging but writing the logs))

I don't know, maybe it is possible to run the debugger on the Linux+Android+Xamarin.Forms platform, but I afraid that it will take a lot of time to configure, so I haven't configured it.

P.S. I've found an important project which solves this problem. I have not tried it on Linux.

https://github.com/VysotskiVadim/vscode-xamarin-debug
https://github.com/Microsoft/vscode-mono-debug/pull/34
https://youtu.be/RnWTy1D031k

понеділок, 19 лютого 2018 р.

8.0 build

On my previous xamarin-android I can't build and run 8.0 projects - I am getting this exception: I/MonoDroid( 2345): System.MissingMethodException: Method 'Android.Views.View.set_Focusable' not found.

So, I decide to try a newer build #610 (24 Oct 2017 14:05:40) - Revision: a08f8851e2db7c5c44ead3c9a29afc7c2ebc05e4
It works for me:

https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/lastStableBuild/

or

https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/lastStableBuild/Azure/processDownloadRequest/xamarin-android/oss-xamarin.android_8.1.99.90.orig.tar.bz2

cd oss-xamarin.android_v8.1.99.90_Linux-x86_64_HEAD_a08f885/bin/Debug/lib

ln -s xamarin.android/xbuild

ln -s xamarin.android/xbuild-frameworks/

середа, 31 січня 2018 р.

issues :: what to do if I can't build apk on Linux

Today I can't because we have migrated to TargetFrameworkVersion v8.0 and I've got a new issue.

But I still can work with the PCL:

Easiest and fastest solution for me today is to build the apk using the macincloud (using the "x86" ABI for emulator and disabled the "Use Shared Mono Runtime" option), and then using the xfast.sh to work on Linux.

Normally I should try to fix the current Droid build issue, but I have not enough time yet.
I can't say does that library work or not, but now I can build and run the PCL.

Build error (Droid project):

Xamarin.Android.Common.targets (_UpdateAndroidResgen target) ->

.../Droid/obj/Debug/__library_projects__/Xamarin.Android.Support.Design/library_project_imports/res/values-v26/values-v26.xml(2): error APT0000:  Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
.../Droid/obj/Debug/__library_projects__/Xamarin.Android.Support.v7.AppCompat/library_project_imports/res/values-v26/values-v26.xml(2): error APT0000:  Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'

четвер, 25 січня 2018 р.

issues :: NuGet client version 3.0.0

The 'Xam.Plugin.SecureStorage 1.0.11' package requires NuGet client version '3.0.0' or above, but the current NuGet version is '2.12.0.0'.
I don't know how to resolve it today. Probably I will need to take another/older version of this package (Xam.Plugin.SecureStorage)  if possible.

P.S. The easiest solution that I've found is here:
https://stackoverflow.com/questions/38118548/how-to-install-nuget-from-command-line-on-linux
is to download the nuget.exe 3.3.0 to the project folder and run it with mono:
mono nuget.exe restore

вівторок, 14 листопада 2017 р.

tips and tricks :: TargetFrameworkVersion v8.0

Today I was creating a new template - I've created a new project and updated all nuget packages in Visual Studio (on the non-Linux computer), so I have got a new template with Xamarin.Forms version 2.4.0.74863 , but ... I can't compile it.

error XA0001: Unsupported or invalid $(TargetFrameworkVersion) value of 'v8.0'. Please update your Project Options.

In the configuration files I have this:

packages.config
<package id="Xamarin.Forms" version="2.4.0.74863" targetFramework="monoandroid80" />
(and there are a lot of "monoandroid80" packages now)

*.Droid.csproj
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>

My compiled Xamarin.Android contains only v7.1 , so I've made a temporary trick (and maybe this is a very incorrect thing):

cd xamarin-android/bin/Debug/lib/xbuild-frameworks/MonoAndroid
ln -s v7.1 v8.0

Now I can build that project and run it - this simple project works. How it will be with a more complex project - I don't know, probably it will not work.

Normally I should re-compile the Xamarin.Android on Linux from zero (or maybe not from zero) - but I don't have many free space today on my ssd, so I don't want to try.