After Google play Package Update, I get an odd java lang exception. What else can I try?

TimothyTimothy USUniversity ✭✭

I recently tried to update the Google Location services package within our application and I cannot seem to find a way to get past this compilation error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error: java.lang.IllegalArgumentException: already added : Lcom/google/android/gms/actions/ItemListIntents;

I've removed all of the google play store packages, deleted my bin and obj folder, cleaned the solution, re-added the packages, and rebuilt the solution. This didn't fix the problem.

Does any have an idea of what else I can try?

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    I've removed all of the google play store packages ... This didn't fix the problem.

    Update all the Google play service libraries in your project to the same version. Try uninstalling and re-installing your packages, delete you bin and obj folders. Try again.

    Similar issue: https://forums.xamarin.com/discussion/100788/java-lang-illegalargumentexception-already-added-lcom-google-android-gms-internal-zzpz

  • TimothyTimothy USUniversity ✭✭

    As stated above, I've already tried removing all of the Google Play packages and reinstalling the latest version. This did not resolve the issue which is why I'm posting here.

  • TimothyTimothy USUniversity ✭✭

    It seems like there could be something else going on here. It seems to be toggling between this error and another:
    /Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277)

    And

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Error XA0000: Unhandled exception: System.IO.IOException: Sharing violation on path /Users/timothy/Desktop/AllClear Android/ACS/obj/Debug/android/src/com/google/android/gms/common/R.java
    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) [0x00259] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-06/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:274
    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 isAsync, System.Boolean anonymous) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-06/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-06/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    at Xamarin.Android.Tools.Files.HashFile (System.String filename, System.Security.Cryptography.HashAlgorithm hashAlg) [0x00000] in <610526b6785240868e600b8f8b229a30>:0
    at Xamarin.Android.Tools.Files.HashFile (System.String filename) [0x00006] in <610526b6785240868e600b8f8b229a30>:0
    at Xamarin.Android.Tools.Files.HasStreamChanged (System.IO.Stream source, System.String destination) [0x00010] in <610526b6785240868e600b8f8b229a30>:0
    at Xamarin.Android.Tools.Files.CopyIfStreamChanged (System.IO.Stream stream, System.String destination) [0x00000] in <610526b6785240868e600b8f8b229a30>:0
    at Xamarin.Android.Tasks.MonoAndroidHelper.CopyIfStreamChanged (System.IO.Stream source, System.String destination) [0x00000] in <610526b6785240868e600b8f8b229a30>:0
    at Xamarin.Android.Tasks.GenerateLibraryResources.GenerateJava (Xamarin.Android.Tasks.GenerateLibraryResources+Library library) [0x0029c] in <610526b6785240868e600b8f8b229a30>:0
    at Xamarin.Android.Tasks.AsyncTaskExtensions+<>c__DisplayClass0_0`1[TSource].b__0 (TSource s) [0x00000] in <610526b6785240868e600b8f8b229a30>:0 (XA0000) (ACS)

  • JarvanJarvan Member, Xamarin Team Xamurai

    Warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved.

    Similar issue you can refer to: https://github.com/xamarin/xamarin-android/issues/1261. Please check the nuget Dependencies to add the corresponding version reference packages.

Sign In or Register to comment.