понеділок, 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.

пʼятниця, 27 жовтня 2017 р.

tips and tricks :: VSCode and dotnetstandard libraries

If we use "dotnetstandard" libraries then VSCode may print some warnings:

Some projects have trouble loading. Please review the output for more details.

[warn]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The primary reference "..." could not be resolved because it was built against the ".NETPortable,Version=v5.0" framework. This is a higher version than the currently targeted framework ".NETPortable,Version=v4.5,Profile=Profile111".

So the Droid project may have the disabled intellisense, because the PCL dll has not been built.

[fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'MyPCLProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'MyPCLProject.dll'

To avoid these warnings in VSCode we may run xbuild.sh or xfast.sh first before opening the VSCode.

It is not necessary if we work with the PCL files only.
And PCL project doesn't see these libraries anyway in VSCode.


четвер, 19 жовтня 2017 р.

warning :: 5.4.0 in the stable branch


Mono 5.4 is on the Stable branch now.

Mono 5.4.0.201 has not been tested with Xamarin Android,
but 5.4.0.199 have very serious issues with Xamarin Android,
so probably 5.4.0.201 will not work for Xamarin Android / Xamarin.Forms today.
Anyway it should be verified (maybe I will try it a bit later).

Please use this:
http://www.mono-project.com/docs/getting-started/install/linux/#accessing-older-releases

My settings:
deb http://download.mono-project.com/repo/debian stretch/snapshots/5.2.0.224 main