I installed Visual Studio for Mac and around to build the application for Android it gave me this error. I installed NDK and now this error appears to me.
Do you know how to solve this?
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2873,3): error XA5101: C compiler for target Arm was not found. Tried paths: "/Users/UserName/Library/Developer/Xamarin/android-sdk-macosx/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc; /Users/UserName/Library/Developer/Xamarin/android-sdk-macosx/ndk-bundle/prebuilt/darwin-x86_64/bin/gcc" [/Users/UserName/Projetos/ProjectName/app/src/android/ProjectNameApp.Droid/ProjectName.Droid.csproj]
An error occurred when executing task 'Release-Android'.
Teardown
Executing custom teardown action...
Environment: QA
Configuration: Release
Target: Release-Android
Error: One or more errors occurred. (MSBuild: Process returned an error (exit code 1).)
MSBuild: Process returned an error (exit code 1).
I have already seen several solutions but I can not solve it, I have already installed NDK, I have already validated the folder where it is installed, I have already inserted AndroidNdkDirectory in Droid.csproj and so far none of this has resulted.
There are two potential ways to resolve this issue:
You can switch the Android NDK version to r17 or lower. One way to do that is to un-check NDK from the Android SDK manager (the Tools tab from your screenshot) to uninstall version r19, then select the gear icon from the lower right of the window, pick the Microsoft (Recommended) repository, and check NDK version r17 (which should now appear in the list) to install that version.
Or, if you are working on code where you can use a preview version of Xamarin.Android, you can update to the current preview Xamarin.Android version 9.3.0.19 by switching to the Preview updater channel in Visual Studio for Mac.
Additional info
The current Xamarin.Android SDK version 9.2.3.0 is not yet compatible with Android NDK versions r18 or higher, where GCC has been removed.
Compatibility with those newer NDK versions (and in particular, compatibility with the change from gcc to clang) is included in the preview Xamarin.Android SDK version 9.3.
Related
I am getting the error: "Could not find SDK "Microsoft.VCLibs, Version=14.0" whenever I attempt to build the default "Blank App (Universal Windows)" app.
I know I have compiled UWP apps before, and is potentially a consequence of recently trying the VS2019 preview (now removed)
I've tried uninstalling/reinstalling VS2019, VS2017, even installed 2015 and the blank UWP apps in each all come up with the same error.
I've tried uninstalling/reinstalling/repairing Windows 10 SDK's.
I've tried various versions of the Microsoft.NETCore.UniversalWindowsPlatform to no avail. (The default is v6.2.10).
Can anyone explain how I can logically chase this error? I'm assuming that it is failing to build the UniversalWindowsPlatform nuget - is this correct? What is supposed to be installing the vclibs extension? How can I see what is preventing it from being installed?
No amount of repairing/installing VS2019, VS2017 or even VS2015, adding or removing options, (re)installing SDKs, (re)installing Visual C++ Runtime libraries made any difference.
what did eventually work was installing VS2019 on a new PC and then copying its entire "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs directory across.
If installing VS2019 installs this directory, I'm not sure why it doesn't fix it as part of reinstalling and/or repairing it!! An opportunity for improvement in VS2019 repair perhaps?
Big thankyou to #NicoZhu-MSFT for all of your help!!
I had to reinstall my operating system this week and my code which was running before doesn't run anymore in Visual Studio 2015. (The code is unchanged since then)
When I build and deploy the code I have the following error:
Severity Code Description Project File Line Suppression State
Error DEP3321 : To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.10586.0 or higher. You currently are running version 10.0.10240.17443. Please update your OS, or change your deployment target to a device with the appropriate version. HistAppV1
After searching on the Google, this article helped in some sense, so when I unload the project and change the lines from
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
When I change it to
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
I can successfully build and deploy my application, but it crashes at the splash screen with this error.
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
};
#endif
Where I also get an exception which is
GattServices error CS0103: The name 'GattServices' does not exist in the current context
I haven't found any clear indication about from which version GattServices are included, but I assume that the change of versioning causes the trouble. How do I solve this problem? Or how can I keep my version, or update my VS to have the appropriate version?
I'm using Visual Studio 2015 Community Edition as in my previous computer install. As I mentioned the OS is a fresh reinstall, with fresh installs of Visual Studio, so I don't really now what is going wrong now.
UPDATE: The latest version is installed and I did a full reinstall of VS2015 with all the packages and still the same error.
Also, I checked the installed programmes, and everything seems to be there:
You have installed the first release of Windows 10 (version 1507, see the version history). Your code requires version 1511 (November 2015 update). I don't think it makes sense to modify your application to support such an old version. Windows 10 has practically forced updates to later versions so I would not expect any significant number of version 1507 installations in the world. Just install the OS updates on your PC and everything should be working fine again.
The intellisense on my Visual Studio Code stopped working rather suddenly the other day. I looked all over Stack Overflow for solutions, including looking at these questions:
Visual Studio Code Intellisense Suggestions Dont Pop Up Automatically
Intellisense Does Not Work Visual Studio Code in OSX Yosemite
However, everything is configured properly:
OmniSharp is running
My project.json is configured correctly
Settings were turned on properly in settings.json
There is only one project.json file and Visual Code shows that it is discovering it properly
I tried reinstalling Visual Code and updating the C# extensions app.
What is the problem?
The issue (after hours of looking) is that OmniSharp requires the Mono runtime. I had pointed at the coreclr (1.0.0-rc1-update1, coreclr x64, darwin) the other day because Mono wasn't compatible with SSL-to-Azure connections. To keep things clean, I had just uninstalled the Mono runtime, hoping to just use the coreclr.
The process for this: I first found this Git post: No intellisense on Linux for ASP .NET 5 coreclr x64 1.0.0.-rc1-final. I followed the instructions and showed the OmniSharp output (how to: Command, Shift, p in Visual Studio Code to open prompt, then type output, select Toggle Output and then change the view to OmniSharp using the dropdown). This output, when trying intellisense, showed a lot of errors being generated.
I then searched those errors and found this question/answer Visual Studio Code Designhostmanager Failed. Apparently, I needed to download the Mono runtime, specifically (in my case), Beta5, per the comment from Matt. To do this I ran dnvm install 1.0.0-beta5 in my terminal on OSX and the runtime installed and set Mono as the currently used runtime. Then, I ran dnu restore to make sure all of the proper library references were cleaned up. Finally, Visual Code prompted me for an additional restore, which I ran as well. Here is my final output (please ignore the extra Mono runtimes. I was playing around and wasn't exactly sure what the specific differences were between them):
1.0.0-beta4 mono linux/osx
1.0.0-beta5 mono linux/osx (this is the runtime)
1.0.0-rc1-update1 coreclr x64 darwin
1.0.0-rc1-update1 mono linux/osx
1.0.0-rc1-update2 mono linux/osx default
Finally, I restarted Visual Studio Code and then restarted the OmniSharp service (once again using the Command, Shift, p command and typing OmniSharp and selecting restart.
This worked. Intellisense started working again.
I had a similar issue and saw the following within the OmniSharp logs:
[ERROR:OmniSharp.Startup] The project system 'DotNetProjectSystem' threw exception during initialization.
The type initializer for 'Crypto' threw an exception.
I stumbled across this issue on GitHub, and ran the following commands using the Terminal:
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
After this I restarted OmniSharp using the instructions above and IntelliSense is back.
I am building a UWP app on Visual Studio 2015 Update 1. I am encountering errors where Compiler says "async is not a feature of C# 4.0 use 5.0 or greater", "Windows namespace cannot be found"
Error CS8025 Feature 'async function' is not available in C# 4.
Error CS0246 The type or namespace name 'ConnectionProfile'
However upon closing my solution and reopening it these errors disappear. And my app runs(in debug mode). However after a few debug sessions the problem resurfaces.
To Correct any errors on my part I Have :
1> Reset VS user Settings
2>Reinstalled VS
3>Reset Windows 10
But the problem doesn't want to go. I am using Windows 10 Home Edition and also I don't use insider builds. Recreated my project from scratch
As a result even the most basic tasks performed in my code appear erroneous.
Can you revise if you have installed Microsoft.NETCore.UniversalWindowsPlatform as a nuget package? Wen you create a new uwp project, automatically its added.
I had similar problem that some namespaces was not encountered and the answer was this nuget package.
I updated to iPhone SDK 4.3 today and now it's not possible to build/run (in debug or release mode) any of my projects that worked fine in iPhone SDK 4.2.
When I try to build or run Monodevelop "hangs" on "Compiling to native code"
If I try to run/debug to the iPhoneSimulator I get the error message:
"Error merging info.plist: Invalid
data"
Does anyone have a solution to this problem?
Explicitly target the 4.2 iOS SDK inside your project's options, under the iPhone Build section. When it is at the Default setting, it always targets the latest iOS version installed.
Upgrading to MonoTouch 3.2.5 will resolve this issue.
For an older version, you just need to create a symlink:
cd /Developer/MonoTouch/SDKs
sudo ln -s MonoTouch.iphonesimulator4.2.sdk MonoTouch.iphonesimulator4.3.sdk
No symlink is needed for the device SDK directory, as it does not contain a version number.
Upates are released to both MonoDevelop and MonoTouch that fix this problem. The updates are available through the update function in MonoDevelop
I had the same problem. It all started for me when I uninstalled/re-installed my dev environment in order to fix something else (breakpoints not being hit during debugging).
So, even though I re-staged my entire laptop in order to come to this conclusion, user653490 is correct, the update to MonoDevelop DOES fix the problem. However, what is NOT clear at first is the fact that the BUILD VERSION is very important. Whereas I was still seeing "Error merging info.plist: Invalid data" with MonoDevelop 2.4.2 build 20402000, once I was using build 2040200*4*, I was able to compile again. The build version is the key. Hope this helps someone else, because it was very frustrating.