Xamarin Forms Error

1

Good afternoon, folks,

I'm trying to compile my project in Xamarin Forms and it's giving this error:

Gravidade   Código  Descrição   Projeto Arquivo Linha   Estado de Supressão
Erro        ***Falha inesperada da tarefa "Aapt".***
System.AggregateException: Um ou mais erros. ---> System.FormatException: A cadeia de caracteres de entrada não estava em um formato correto.
   em System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   em System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   em Xamarin.Android.Tasks.ManifestDocument.CalculateVersionCode(String currentAbi, String versionCodePattern, String versionCodeProperties)
   em Xamarin.Android.Tasks.Aapt.GenerateCommandLineCommands(String ManifestFile, String currentAbi, String currentResourceOutputFile)
   em Xamarin.Android.Tasks.Aapt.DoExecute(ITaskItem manifestFile, ParallelLoopState state, Int32 loop)
   em System.Threading.Tasks.Parallel.<>c__DisplayClass30_0'2.<ForEachWorker>b__3(Int32 i, ParallelLoopState state, TLocal local)
   em System.Threading.Tasks.Parallel.<>c__DisplayClass17_0'1.<ForWorker>b__1()
   em System.Threading.Tasks.Task.InnerInvoke()
   em System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   em System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
   --- Fim do rastreamento de pilha de exceções internas ---
   em System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   em System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   em System.Threading.Tasks.Task.Wait()
   em System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action'1 body, Action'2 bodyWithState, Func'4 bodyWithLocal, Func'1 localInit, Action'1 localFinally)
   em System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](TSource[] array, ParallelOptions parallelOptions, Action'1 body, Action'2 bodyWithState, Action'3 bodyWithStateAndIndex, Func'4 bodyWithStateAndLocal, Func'5 bodyWithEverything, Func'1 localInit, Action'1 localFinally)
   em System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable'1 source, ParallelOptions parallelOptions, Action'1 body, Action'2 bodyWithState, Action'3 bodyWithStateAndIndex, Func'4 bodyWithStateAndLocal, Func'5 bodyWithEverything, Func'1 localInit, Action'1 localFinally)
   em System.Threading.Tasks.Parallel.ForEach[TSource,TLocal](IEnumerable'1 source, ParallelOptions parallelOptions, Func'1 localInit, Func'4 body, Action'1 localFinally)
   em Xamarin.Android.Tasks.Aapt.Execute()
   em Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   em Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
---> (Exceção Interna N° 0) System.FormatException: A cadeia de caracteres de entrada não estava em um formato correto.
   em System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   em System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   em Xamarin.Android.Tasks.ManifestDocument.CalculateVersionCode(String currentAbi, String versionCodePattern, String versionCodeProperties)
   em Xamarin.Android.Tasks.Aapt.GenerateCommandLineCommands(String ManifestFile, String currentAbi, String currentResourceOutputFile)
   em Xamarin.Android.Tasks.Aapt.DoExecute(ITaskItem manifestFile, ParallelLoopState state, Int32 loop)
   em System.Threading.Tasks.Parallel.<>c__DisplayClass30_0'2.<ForEachWorker>b__3(Int32 i, ParallelLoopState state, TLocal local)
   em System.Threading.Tasks.Parallel.<>c__DisplayClass17_0'1.<ForWorker>b__1()
   em System.Threading.Tasks.Task.InnerInvoke()
   em System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   em System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---  AppRDVAUX.Android

Can anyone help me solve it?

@edite

2>    AdditionalAndroidResourcePaths:  (TaskId:495)

2 > LibraryProjectJars: (TaskId: 495) 2 > ExtraArgs: --no-version-vectors (TaskId: 495) 2 > CreatePackagePerAbi: False (TaskId: 495) 2 > ResourceNameCaseMap: layout \ Tabbar.axml | layout \ tabbar.xml; layout \ Toolbar.axml | layout \ toolbar.xml; drawable \ LogoAntigoAraguaina.png | drawable \ logoantigoaraguaina.png; drawable \ DevByAcesso.png | drawable \ devbyacesso.png; drawable \ IconAraguaina.png | drawable \ iconaraguaina.png; drawable \ Araguaina240360.jpg | drawable \ araguaina240360.jpg; (TaskId: 495) 2 > VersionCodePattern: {abi} {versionCode: D5} (TaskId: 495) 2 > VersionCodeProperties: (TaskId: 495) 2> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Enterprise \ MSBuild \ Xamarin \ Android \ Xamarin.Android.Common.targets (1942,3): error MSB4018: Unexpected failure of the "Aapt" task. 2> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Enterprise \ MSBuild \ Xamarin \ Android \ Xamarin.Android.Common.targets (1942,3): error MSB4018: System.AggregateException: One or more errors. --- > System.FormatException: The input string was not in a correct format.

    
asked by anonymous 22.06.2018 / 20:14

1 answer

0

I think the error is not related to the Java version, SDK, or your imaging features as suggested in the comments ...

You must have changed the properties of the android project. Specifically, the Version Number field must have invalid content, which can not be converted to numeric.

  

System.AggregateException: One or more errors. --- > System.FormatException: The input string was not in a correct format.      ...      in Xamarin.Android.Tasks.ManifestDocument. CalculateVersionCode (String currentAbi, String versionCodePattern, String versionCodeProperties)

I think your intention was to change Version Name .

Check the properties of the project or manifest , and fix what it recompiles.

I hope this helps.

    
25.06.2018 / 16:30