I am trying to make a build: xbuild /t:SignAndroidPackage /p:Configuration=Release /p:AndroidSdkDirectory=/Users/administrator/Library/Android/sdk MyApp/Droid/MyApp.Droid.csproj
, but got errors:
/Users/administrator/Documents/teamcityagent/work/f540e07669d97f37/GoBounce/Droid/obj/Release/__library_projects__/Xamarin.Android.Support.v7.AppCompat/library_project_imports/res/values-v24/values-v24.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. /Users/administrator/Documents/teamcityagent/work/f540e07669d97f37/GoBounce/Droid/obj/Release/__library_projects__/Xamarin.Android.Support.v7.AppCompat/library_project_imports/res/values-v24/values-v24.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
I've tried different options for Application properties, but result still the same
On Mac installed several android SDK versions: 15,19,21,23,24,26 and several android SDK build tools.
The strangest thing is that I could open source code downloaded by TC agent on this build server in XamarinStudio and build project without any problem, but in TC I got this annoying error. What should I do?
May be someone find this answer usefull.
Finally fixed that by following .csproj file properties:
... <TargetFrameworkVersion>v6.0</TargetFrameworkVersion> ... <AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk> ... <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug</OutputPath> <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <AndroidLinkMode>None</AndroidLinkMode> <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release</OutputPath> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <AndroidManagedSymbols>true</AndroidManagedSymbols> </PropertyGroup>
and in AndroidManifest.xml:
<uses-sdk />
Answers
May be someone find this answer usefull.
Finally fixed that by following .csproj file properties:
and in AndroidManifest.xml: