Android的VSTS构建定义失败 [英] VSTS Build Definition for Android failing

查看:111
本文介绍了Android的VSTS构建定义失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始将Team Services中的构建定义用于Xamarin Android应用。在Visual Studio中,一切正常,我可以将代码签入VS Team Services。



UPDATE 1



现在,现在为我的项目创建一个Build Definitions,它正在下降。





这是日志的一部分:


2016-10-13T03:30:45.7198826Z 考虑将 Xamarin.Forms.Xaml,Version = 2.0.0.0,Culture = neutral,processorArchitecture = MSIL作为文件名,但它不存在。



2016-10-13T03:30: 45.7748834Z 2> C:\a\1\sDentalLife\包\Xamarin.Forms.2.3.1.114\build\portable-win + net45 + wp80 + win81 + wpa81 + MonoAndroid10 + MonoTouch10 + Xamarin.iOS10\Xamarin.Forms.targets(40,3):错误MSB4062:无法从程序集C中加载 Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName任务。 \1个\DentalLife软件包\Xamarin.Forms 2.3.1.114\构建\便携式-win + net45 + wp80 + win81 + wpa81 + MonoAndroid10 + MonoTouch10 + Xamarin.iOS10\Xamarin.Forms。 Build.Tasks.dll。无法加载文件或程序集'file:/// C:\a\1\s\DentalLife\软件包\Xamarin.Forms.2.3.1.114\build\portable-win + net45 + wp80 + win81 + wpa81 + MonoAndroid10 + MonoTouch10 + Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll'或其依赖项之一。该系统找不到指定的文件。确认声明正确,程序集及其所有依赖项均可用,并且任务包含实现Microsoft.Build.Framework.ITask的公共类。 [C:\a\1\sDentalLife\DentalLife\DentalLife\DentalLife.csproj]



2016-10-13T03 :30:45.7778918Z 2>完成的建筑项目 C:\a\1\s\DentalLife\DentalLife\DentalLife\DentalLife.csproj(默认目标)-失败。



2016-10-13T03:30:45.7808866Z 1>完成的建筑项目 C:\a\1\s\ DentalLife\DentalLife\DentalLife.Droid\DentalLife.Droid.csproj(干净; PackageForAndroid目标)-失败。



2016- 10-13T03:30:45.8018852Z



2016-10-13T03:30:45.8018852Z 构建失败。

>

几天后,试图找到任何信息,我发现了以下stackoverflow链接:




  1. 更新2



    经过大量尝试并查看了Internet,我发现问题在于托管代理的Xamarin版本不同。然后我发现了该帖子



    最后,这是Gi的链接在您可以找到代码的tHub存储库中:
    https://github.com/Lesthad/CIXamarinShowTest



    任何帮助将不胜感激。感谢和抱歉,这篇文章很长:-(

    解决方案

    解决方案是您需要在Xamarin.Android步骤中指定JDK版本构建定义的值。


    I'm starting using the build definitions from Team Services for a Xamarin Android App. In Visual Studio everything works fine and I can check in the code to VS Team Services.

    UPDATE 1

    Now, at the moment to create an Build Definitions for my project, it's falling.

    And this is part of the log:

    2016-10-13T03:30:45.7198826Z Considered treating "Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL" as a file name, but it didn't exist.

    2016-10-13T03:30:45.7748834Z 2>C:\a\1\s\DentalLife\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets(40,3): error MSB4062: The "Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName" task could not be loaded from the assembly C:\a\1\s\DentalLife\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'file:///C:\a\1\s\DentalLife\packages\Xamarin.Forms.2.3.1.114\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\a\1\s\DentalLife\DentalLife\DentalLife\DentalLife.csproj]

    2016-10-13T03:30:45.7778918Z 2>Done Building Project "C:\a\1\s\DentalLife\DentalLife\DentalLife\DentalLife.csproj" (default targets) -- FAILED.

    2016-10-13T03:30:45.7808866Z 1>Done Building Project "C:\a\1\s\DentalLife\DentalLife\DentalLife.Droid\DentalLife.Droid.csproj" (clean;PackageForAndroid target(s)) -- FAILED.

    2016-10-13T03:30:45.8018852Z

    2016-10-13T03:30:45.8018852Z Build FAILED.

    After, a couple of days trying to find any information I found the following stackoverflow links:

    1. Visual Studio Team Services - Build fails, definition wrong?
    2. TFS remains out of sync after Get Sources step

    Basically, in those post they mention that this could be a security related issue.

    I tried following all suggestion from changing the permissions to changing some parameters like the Build job authorization scope. But any luck so far :-(

    UPDATE 2

    After a lot of attempts and looking on Internet, I found that te problem was the hosted agent had a different version for Xamarin.Froms. Then I found this post http://www.blogaboutxamarin.com/xamarin-devops-with-vsts-setup-a-cross-platform-build-agent-on-windows/ where I created a on-premise agent and the Xamarin.Forms version got updated to be 6.1.1. After that I was able to queue a build ALL in Green :-)

    However, I decided to upgrade the Xamarin.Forms version to be 2.3.1.114 in my Solution, because I needed to use a class that is available in that version. Locally, it builds and run OK.

    Now, the problem is again the agent build in VSTS. This time is showing me a different error. That there are some dlls that couldn't be found:

    obj\Release\android\src\mono\android\support\v7\internal\widget\ActivityChooserModel_OnChooseActivityListenerImplementor.java:8: error: package android.support.v7.internal.widget.ActivityChooserModel does not exist obj\Release\android\src\mono\android\support\v7\internal\widget\ActivityChooserModel_OnChooseActivityListenerImplementor.java:33: error: package android.support.v7.internal.widget does not exist 2016-10-17T02:26:08.1053649Z private native boolean n_onChooseActivity (android.support.v7.internal.widget.ActivityChooserModel p0, android.content.Intent p1);

    In my Android project I have:

    Finally, this is the link of the GitHub repo where you can find the code: https://github.com/Lesthad/CIXamarinShowTest

    Any help would be very appreciate. Thanks and sorry for this long post :-(

    解决方案

    The solution is that you need to specify JDK version in Xamarin.Android step of your build definition.

    这篇关于Android的VSTS构建定义失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆