пʼятниця, 23 червня 2017 р.

Compilation prerequisites

On Linux you can't create the Xamarin.Forms project from zero.

And for the compilation it is necessary to take the good template (!!!),
then msbuild will compile it correctly in many cases,
otherwise you may have a very strange errors in runtime,
or you will be able to build it only with xbuld.

Today you may try to use the xamarin-forms-samples for your experiments.

Sample.sln

Please comment out #
lines for iOS (and other, UWP, if any) project(s) - there are 3 lines for each project to comment out.

And every Sample.Droid.csproj will need the next:

<PropertyGroup Condition=" '$(OS)' == 'Unix' ">
  <AndroidSdkDirectory>/home/workerlamp/android-toolchain/sdk</AndroidSdkDirectory>
</PropertyGroup>

(please refer to this link to use more properties)

Also I set for all three PropertyGroup(s) the next line

<AndroidSupportedAbis>armeabi-v7a,x86</AndroidSupportedAbis>

x86 allows me to run it on emulator,

but if I will set pure "armeabi" as in some of examples it will not work on emulator at all,
but "armeabi-v7a" and "x86" works ok for me.
Usually I use only x86: <AndroidSupportedAbis>x86</AndroidSupportedAbis>

I don't know is it possible to make release builds on Linux to work on different devices, but for the development it is enough.

Немає коментарів:

Дописати коментар