如何避免Xamarin.Android构建中的异常“在/android/gms/R.java和/android/gms/base.R.java路径上共享冲突?

问题描述 投票:0回答:1

[构建Xamarin Android项目时,我们偶尔地获得这些异常。有什么想法如何消除薄片?在我们这方面是否可以解决,或者看起来像Xamarin Android错误?

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000: Unhandled exception: System.IO.IOException: Sharing violation on path /Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/obj/Release/android/src/com/google/android/gms/R.java [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize) [0x00000] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int) [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.File.Create (System.String path, System.Int32 bufferSize) [0x00000] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.File.Create (System.String path) [0x00000] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tools.Files.CopyIfStreamChanged (System.IO.Stream stream, System.String destination) [0x0002b] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tasks.MonoAndroidHelper.CopyIfStreamChanged (System.IO.Stream source, System.String destination) [0x00000] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tasks.GenerateLibraryResources.GenerateJava (Xamarin.Android.Tasks.GenerateLibraryResources+Library library) [0x0029c] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tasks.AsyncTaskExtensions+<>c__DisplayClass0_0`1[TSource].<ParallelForEach>b__0 (TSource s) [0x00000] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000: Unhandled exception: System.IO.IOException: Sharing violation on path /Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/obj/Release/android/src/com/google/android/gms/base/R.java [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize) [0x00000] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int) [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.File.Create (System.String path, System.Int32 bufferSize) [0x00000] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at System.IO.File.Create (System.String path) [0x00000] in <7d0bc631cadd4a07bf74717847e90cfa>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tools.Files.CopyIfStreamChanged (System.IO.Stream stream, System.String destination) [0x0002b] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tasks.MonoAndroidHelper.CopyIfStreamChanged (System.IO.Stream source, System.String destination) [0x00000] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tasks.GenerateLibraryResources.GenerateJava (Xamarin.Android.Tasks.GenerateLibraryResources+Library library) [0x0029c] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1669,2): error XA0000:   at Xamarin.Android.Tasks.AsyncTaskExtensions+<>c__DisplayClass0_0`1[TSource].<ParallelForEach>b__0 (TSource s) [0x00000] in <82010c32869043cdad86578a8131c7e9>:0  [/Users/APP/Development/BambooAgents/App-Agent-P-5/xml-data/build-dir/App-APP-APPDROID/src/App.Application.Droid/App.Application.Droid.csproj]

我们checked,构建代理已选择有效的$(TargetFrameworkVersion),并且所需的android api级已安装在$(AndroidSdkDirectory)\platforms中。我们使用Android 10作为目标框架版本,并在/Users/Shared/Development/Android/sdk/platforms/android-29中安装了SDK 29。

Visual Studio版本:

=== Visual Studio Community 2019 for Mac ===

版本8.4(内部版本2657)安装UUID:59b142d8-4988-47b4-b8f6-69df598d76b6 GTK + 2.24.23(罗利主题)Xamarin.Mac 5.16.1.25(issue-7441-d16-3-vsmac / 881172e73)

软件包版本:606000155

=== Mono Framework MDK ===

运行时:Mono 6.6.0.155(2019-08 / 296a9afdb24)(64位)包版本:606000155

===罗斯林(语言服务)===

3.4.0-beta4-19562-05 + ff930dec4565e2bc424ad3bf3e22ecb20542c87d

=== NuGet ===

版本:5.3.0.6192

=== .NET Core SDK ===

SDK:/usr/local/share/dotnet/sdk/3.1.100/Sdks SDK版本:3.1.1002.1.802 MSBuild SDK:/Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin/Sdks

=== .NET Core运行时===

运行时:/ usr / local / share / dotnet / dotnet运行时版本:3.1.02.1.142.1.13

=== Xamarin.Profiler ===

版本:1.6.12.29位置:/ Applications / XamarinProfiler.app/Contents/MacOS/Xamarin Profiler

===更新程序===

版本:11

=== Apple开发人员工具===

Xcode 11.3(15712)内部版本11C504

=== Xamarin.Mac ===

版本:6.8.3.0(Visual Studio社区)哈希:0d8fe219c分支:d16-4建立日期:2019-12-04 13:06:40-0500

=== Xamarin.iOS ===

版本:13.8.3.0(Visual Studio社区)哈希:0d8fe219c分支:d16-4建立日期:2019-12-04 13:06:41-0500

=== Xamarin Designer ===

版本:16.4.0.468哈希:519082ea8分支:remotes / origin / d16-4 Build日期:2019-12-04 16:21:00 UTC

=== Xamarin.Android ===

版本:10.1.1.0(Visual Studio社区)提交:xamarin-android / d16-4 / f2c9364 Android SDK:/ Users / Shared / Development / Android / sdk支持的Android版本:8.0(API级别26)8.1(API级别27)

SDK工具版本:26.1.1 SDK平台工具版本:29.0.4 SDK生成工具版本:29.0.2

内部信息:Mono:bef1e63 Java.Interop:xamarin/java.interop/d16-4@c4e569f ProGuard:xamarin / proguard / master @ 905836d SQLite:xamarin/sqlite/[email protected]工具:xamarin / xamarin-android-tools / master @ 9f4ed4b

=== Microsoft Mobile OpenJDK ===

Java SDK:/Users/Shared/Development/jdk/microsoft_dist_openjdk_8.0.251.8.0-25 Android Designer EPL代码在此处可用:https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK管理器===

版本:16.4.0.9哈希:3f7256f分支:remotes / origin / d16-4 Build日期:2019年12月19日18:59:12 UTC

=== Android设备管理器===

版本:16.4.0.28哈希:68e9956分支:remotes / origin / d16-4 Build日期:2019年12月19日18:59:32 UTC

=== Xamarin检查器===

版本:1.4.3哈希:db27525分支:1.4版本生成日期:09年一月2018年7月21:20:18 GMT客户端兼容性:1

===生成信息===

发布ID:804002657 Git版本:4c6723413e884e024466fc93ff10e938bca7f721建立日期:2020-01-0618:20:13 + 00构建分支:release-8.4 Xamarin扩展:0f572cad12fd3886cd8e21a8b93b86e29ceaf111

===操作系统===

Mac OS X 10.15.2 Darwin 19.2.0 Darwin内核版本19.2.0周六11月9日03:47:04 PST 2019根目录:xnu-6153.61.1〜20 / RELEASE_X86_64 x86_64

[构建Xamarin Android项目时,我们偶尔会遇到这些异常。有什么想法如何消除薄片?在我们这方面是否可以解决,或者看起来像Xamarin Android错误? / Library / ...

xamarin xamarin.android
1个回答
0
投票

更新软件包Xamarin.Build.Download从版本0.7.1之后。到0.8.0,我们无法重现此错误。我们还更新了将此库作为依赖项的软件包。在我们的案例中,这是Xamarin.Firebase.Analytics和Xamarin.Android.Crashlytics。

© www.soinside.com 2019 - 2024. All rights reserved.