-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the "linkassemblies" task failed for Android Xamarin Forms #1521
Comments
From @samhouts on February 23, 2018 19:50 When you say "Add Nuget Packages to Xamarin Forms Solution", which nuget packages are you referring to? Can you reproduce this with a brand new Xamarin.Forms solution, or does it only seem to happen to your project? Thanks |
From @latsson on February 23, 2018 21:0 Is not this a bug in visual studio that has been fixed? Can't find the bug report right now though. |
From @PureWeen on February 24, 2018 6:5 This might be a bug with the Android linker I've seen it come up when you have nugets that still include PCL libraries or pre-netstandard 2.0 libraries and you add them into a netstandard 2.0 projects. I'm still running up against this issue with the Azure IoT libraries Azure/azure-iot-sdk-csharp#197 I fixed it their by just recompiling them against NetStandard 2.0 I've also noticed this error only comes up if you set it to link both user and full assemblies. |
From @ExzaSolutions on February 24, 2018 20:6 Hi,our appsize was 107mb on Android. Thank you for commenting on this topic I appreciate it very much! |
From @PureWeen on March 28, 2018 19:46 @ExzaSolutions have you tried with the latest Visual Studio? I've noticed in my case the latest updates seem to give a better exception than NRE and indicate exactly what it's unable to link |
From @ExzaSolutions on March 28, 2018 19:50 Hi,thank you,I will give it a try.That will help a lot. |
I am migrating this over to the android team :) |
@ExzaSolutions it's been a while since we've heard back on this. Can you send a repro? Closing this for now, as we have had many releases since VS 15.5 (on VS 15.8.5 at present). Feel free to reopen and give more info if this is still a problem, thanks! |
@jonathanpeppers @jassmith did you ever get clear repo steps? I always set linking to none... as it just results in java errors. |
@rcunniffe if you can reproduce this, can you file a new issue with your build logs? A sample project would be even better! I have tested Xamarin.Forms apps with linking set to |
@jonathanpeppers in fairness a basic project from scratch will mostly always be ok. It's when you have a more complex project overtime with plugins ,signings and things like push notification permissions. Making it hard to track down these sorts of issues, but yeah if i get a chance to recreate, I will. |
Xamarin Forms seems to have large app file sizes,if you remove the linking it just gets too big to give to clients. |
@ExzaSolutions yep, of course you are right. But the point is people cannot compile when it's turned on. For myself, I have always gotten the same error message: 4>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2464,3): error MSB6006: "java.exe" exited with code 1. In the output I can see plenty of warnings but nothing that stands out as an error. |
Yes that is true,thank you! |
Search for error MSB6006: "java.exe" exited with code 1. There are several reason for it. We all have been there |
yeah agreed, ive update java, heapsize etc. Just it always seems to come up. normally down to proguard. |
@jassmith @samhouts @jonathanpeppers, Hi team, this is York from Xamarin APAC support team, my customer encounter the same issue. Everything works fine last week, but when my customer updated all When android is set to build to
Customer has shared his issue project and I could reproduce this issue on my side, my VS version is |
Hi, folks, submit a new issue if you're still seeing an issue related to this. We believe the I followed up with @aixiaozi over email, and the issue in the project ( <package id="System.Binary" version="0.1.0-alpha-001" targetFramework="monoandroid80" />
<package id="System.Buffers.Primitives" version="0.1.0-alpha-001" targetFramework="monoandroid80" />
<package id="System.Collections.Sequences" version="0.1.0-alpha-001" targetFramework="monoandroid80" /> They weren't actually used, so removing them solved the problem. |
From @ExzaSolutions on December 27, 2017 8:25
Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues
Description
When the Xamarin Forms Project builds the Android build fails.
The android is set to build to Release,and the linking is set to Sdk Assemblies only.
When it is set to None it builds successfully,but the apk is far too big then.
Steps to Reproduce
Expected Behavior
Should build successfully
Actual Behavior
Fails with "LinkAssemblies" task failed unexpectedly. System.NullReferenceException: Object reference not set
Basic Information
Microsoft Visual Studio Community 2017
Version 15.5.2
VisualStudio.15.Release/15.5.2+27130.2010
Microsoft .NET Framework
Version 4.7.02556
Installed Version: Community
Visual Basic 2017 00369-60000-00001-AA801
Microsoft Visual Basic 2017
Visual C# 2017 00369-60000-00001-AA801
Microsoft Visual C# 2017
Visual F# 4.1 00369-60000-00001-AA801
Microsoft Visual F# 4.1
Application Insights Tools for Visual Studio Package 8.10.01106.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2017 15.0.31125.0
ASP.NET and Web Tools 2017
ASP.NET Core Razor Language Services 1.0
Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2012 4.0.20601.0
For additional information, visit https://www.asp.net/
ASP.NET Web Frameworks and Tools 2017 5.2.51007.0
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 15.0.31106.0
Azure App Service Tools v3.0.0
Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio 2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio
Azure Data Lake Tools for Visual Studio 2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Fabric.DiagnosticEvents 1.0
Fabric Diagnostic Events
JavaScript Language Service 2.0
JavaScript Language Service
Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.
Microsoft Azure HDInsight Azure Node 2.2.9000.1
HDInsight Node under Azure Node
Microsoft Azure Hive Query Language Service 2.2.9000.1
Language service for Hive query
Microsoft Azure Service Fabric Tools for Visual Studio 1.8
Microsoft Azure Service Fabric Tools for Visual Studio
Microsoft Azure Stream Analytics Language Service 2.2.9000.1
Language service for Azure Stream Analytics
Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.51120.3
Microsoft Continuous Delivery Tools for Visual Studio 0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Mono Debugging for Visual Studio 4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 4.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
SQL Server Data Tools 15.1.61710.120
Microsoft SQL Server Data Tools
ToolWindowHostedEditor 1.0
Hosting json editor into a tool window
TypeScript Tools 15.5.11025.1
TypeScript Tools for Microsoft Visual Studio
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
WebJobs Tools v1.0.0 15.0.31106.0
WebJobs Tools v1.0.0
Xamarin 4.8.0.753 (6575bd113)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.8.188 (c5813fa34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.1.0.25 (HEAD/d8c6e504f)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.6.1.2 (6857dfc)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Screenshots
Reproduction Link
Copied from original issue: xamarin/Xamarin.Forms#1471
The text was updated successfully, but these errors were encountered: