I am trying to build a Xamarin app in Azure Pipelines. Xamarin Android project is building well locally in Windows / MAC . But Xamarin Android build is failing on Azure Pipelines. I am getting the below error while trying to build the Xamarin.Android app in Azure Pipelines.
#[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Aapt2.targets(87,3): Error APT2000: top-left corner pixel must be either opaque white or transparent.
##[error]Resources\drawable-hdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png(0,0): Error APT2261: file failed to compile.
I don't have this folder in source code. This folder ( drawable-hdpi-v4) is automatically getting generated. I don't know how this folder / image is getting created automatically.
Configurations are given below
MS Build Latest Version
Build Agent : Windows
Xamarin Android : 10.3.1.4
Visual Studio : 16.6.
The issue got fixed after updating Visual Studio 2019 to latest version ( 16.7.3) and Azure Pipeline Agent ( 2.174.2).
Related
I'm actively using Visual Studio 16.6 windows / 8.6.1 macOS to build and test iOS / Android application, in Xamarin Forms. macOS is running Xcode 11.
I can't push to AppStoreConnect from "Sign and Distribute" directly.
Everything is working fine step by step: build in release for iDevice, signing and distribution profile accepted, export to IPA file, and uploading via Xcode->Organizer. But i'd like to do this simply from Visual Studio; either on my PC or mac.
I have the following errors on Visual Studio / windows when uploading to AppStoreConnect:
Error: unable to create IPA file for distribution of archive myApp
MessagingRemoteException: error happened on client Build160001055 during execution of an answer for category xvs/Build/16.6.0.1055/execute-task/myApp.iOS/c1cf1c8002fCopy
TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Copy' threw an exception.
PlatformNotSupportedException: Operation is not supported on this platform.
I have the following error on Visual Studio / macOS when uploading to AppStoreConnect:
Publication failure: we are unable to create an authentification session.
Notice Visual Studio / macOS is asking creds (i'm using developper account) while Visual Studio / windows is not (i surely have it registered before, but i don't remember).
This issue appears to have been resolved in a hotfix (16.6.1) released today, as per this bug report: https://developercommunity.visualstudio.com/content/problem/961282/xamarinios-fails-to-build-with-messagingremoteexce.html
I'm trying to create a build definition to build and package an Android app based on Xamarin Forms.
I've installed Visual Studio 2017 and Xamarin on my build server, and even after restarting my server, my agent does not find the Xamarin.Android capability.
I'm still getting an error while queuing one build :
No agent could be found with the following capabilities AndroidSDK, MSBuild,
Xamarin.Android, JDK
The only capability that is missing on my agent are Xamarin.Android, MSBuild , AndroidSDK
I add the environnement variable "Xamarin.Android" , i restart the build agent ; but the same error
Do you have any idea on how to add it on my agent ?
Using visual studio 15.7.4
Xamarin 4.10.10.2
Xamarin forms project
compile version api level 26
target android version api level 26
release mode
sdk link assemblies only
using Xamarin forms 3.1.0
Issue:
app starts fine (although long startup time) in debug mode. After installed to 2 different real phones the app splash screen shows on launch but hangs indefinitely
The solution for me was to enable "Zipalign" on the "Signing and aligning APK file(s)" task in my Xamarin Android build definition on Azure Devops (previously VSTS). I got the answer from here
This turned out to be something with the build definition in VSTS, as it worked when built right from Visual Studio
I'm working on Xamarin Forms application in Visual studio 2017 .I wanted to deploy application to android simulator .I try to deploy it debug mode.
i set android project as the startup project
When i deploying i get this warning
No Address and User has been specified in order to establish a connection to a Mac Server, so only the main assembly was compiled for project CMI.IOSApp. Connect to a Mac Server and try again to build the full application.
Go to VS menu Build->Configuration Manager is iOS project tick when you have set your android project as start up project.
So the Build and Deploy checkbox for iOS project should be untick when you are going for Android build.
I am using VS 2015 enterprise update 3. After fresh installation, I created a new project--> cross platform tools--> Blank Xaml App(Xamarin.Forms Portable). then made Andriod project is default project from Solution explorer.
Tried select a device but none is available, altough when i open SDK Manager i can see 3 devices.
Andriod error
List of devices
Did you setup your android project as your startup project?
Werid because in your screenshot it shows your portable project as your startup project. This is how it looks like when i debug my android project.