This is for Xamarin 8.10.11 (Build 8) for MacOS, Community Edition.
I recently returned to Xamarin development and opened a mobile project that I had worked on about a month ago. However both the Xamarin.iOS and Xamarin.Android projects have a yellow warning triangle beside them saying that the appropriate tool chain is not installed.
Both are installed.
If I download the latest DMG and request to install, it says there's nothing to be done (and indicates that both iOS and Android components are already installed).
Any thoughts on what else I can try?
The Show Details in the About dialog is missing all the relevant components (a colleague sent me their listing from a correctly working installation).
So, eventually I figured it out.
The problem is that mobile development in Visual Studio is added as an extension. And for no reason I can fathom, all the Mobile Development extensions had been disabled.
I have no idea how that happened, but re-enabling them made the problem go away.
Related
We are using Unity 2018.3.8f1.
We have added Android Build Support from Unity Hub - Add Component:
But if we go to Unity Preferences - External Tools, the Android SDK location is empty:
I have not been able to find the location of the Android SDK folder anywhere. I'm wondering if the component installed by Unity Hub is something different to Android SDK. Maybe it must be installed separately from: https://developer.android.com/studio?pkg=tools#downloads?
UPDATE
So far I have installed "Command line tools only" from the previous link. Then, I have installed OpenSDK (Vistual Studio did it for me: it asked me to update and install it as one of the things to update).
But when I opened tools/bin/sdkmanager, it said "Java is not installed". So I also installed Oracle Java SDK. Unfortunately tools/bin/sdkmanager returned errors after it. I applied a few workarounds I found by googling the errors. Still not luck.
So I have moved to the easy way: installing the full version of Android Studio. If we choose custom, we'll see that Android SDK Platform is going to be installed:
So it is working, but I still have not idea of how many things I have duplicated on my system wasting space. I have:
The Android component installed from Unity Hub
Android Studio installed, which comes with the emulator and the IDE (I don't need them)
OpenSDK (installed by Visual Studio)
An embedded version of Java in Unity
Oracle Java
Are they all actually needed? I don't think so!
It seems the only thing you are wondering is if the component installed by Unity hub is something different to Android SDK... the short answer is yes. You have to download it on the Android Developer SDK website you linked in the question. You only need the SDK under "Command line tools only" at the bottom of the page. If you do this you also need to download the jdk separatly here.
I cannot hit a breakpoint in VS when debugging any native iOS app through VS2017 Pro. I have trawled the Xamarin/Stack forums and seen this has been a problem in the past and I have tried the suggestions but they relate to a 3.xxx version of Xamarin. Even an out-the-box new project untouched except for placing a breakpoint still does not hit, the build server pops up the simulator and runs as expected. Android is fine
This was working, I have recently downgraded from Enterprise to Pro but think this may be a red herring. I have 2015/13 pro installed with the same problem.
Is this an issue build server side or the windows side? I get the following generated in my bin App.app, App.exe, App.pdb but no app.mdb i do get the referenced dll.mdb files.
Current vs setup...
Microsoft Visual Studio Professional 2017 (2)
Version 15.1 (26403.7) Release
VisualStudio.15.Release/15.1.0+26403.7
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Professional
...
Visual Studio Tools for Universal Windows Apps 15.0.26403.07
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Xamarin 4.4.0.34 (3f99c5a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 7.2.0.7 (b16fb82)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.8.0.174 (7656cc6)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
The Mac
Xamarin Studio 6.3
VS for Mac 7
See this similar answer: Xamarin iOS debugger not hitting breakpoints
Also, make sure you don't have a firewall blocking Port 10000.
I ran into something similar, and it turns out my debug settings for my physical device had some defaults that prevented debugging from working. This may not fix your issue, but you might want to at least check your project settings for a few things.
Under iOS Build I changed my Linker Behavior from Link All to Link Framework SDKs Only. Also, for some reason in a default debug profile, the Strip native debugging symbols option on that same page was checked. Make sure it's unchecked.
This one was already enabled for me but you should verify anyway: double check that on the page iOS Debug that Enable Debugging is checked.
I faced a similar issue but on Android application: I solved by uncheck the option "Code Optimization" from Project >> Options >> Build and set the DebugType to Full
Same here, windows 10, VS 2017 -> MAC -> iPhone
Somtimes I got Debug-Log and can hit breakpoints but mostly not.
A solution / workaround which at least works for me.
Problem:
Setup: Windows 10 with VS2017, Mac-Book, iPhone connected to Mac-Book.
Debug-Log / Breakpoint-Hitting seams to work sometimes (seldom) / non deterministic.
Solution / workaround:
Verify: In case no Debug-Log occurs (e.g. no "Loaded assembly:..." lines etc.) the "Choose Device" drop-down box in the "Tools >> iOS >> Device Log" window shows TWO times the name of the iOS-device.
Stop the debug and explicitly stop the app on the iOS-device (if necessary also delete it for re-deploy)
Via "Tools >> iOS >> Xamarin Agent" disconnect from your Mac and then reconnect again.
Verify: the "Choose Device" drop-down in the "Tools >> iOS >> Device Log" window now shows only ONE times the name of the iOS-device.
Debug the App - it now should work.
See also XamarinForum
Hope it also works for you.
Erdega
I've installed Xamarin and tried in Visual Studio to start with a small app and test the web view with this. So for this, I've installed the JDK, the Android SDK and Android NDK on my computer. I'm working throught a tutorial for a web view and I have the problem, when I run the Main.axml, it shows me the error, that my Android SDK could not be found (look at the first attachement). When I check my location paths for the JDK, SDK and NDK, it shows me the correct path and a green tick, so the path and files are correct (look at the second attachement). But my app don't recognize it. What's the problem here? I found some threads on stackoverflow for the same problem, but nothing helped me.
1. Attachement
2. Attachement
OS: Windows 8.1
IDE: MS Visual Studio 14.0.23
Xamarin: 4.2.0
EDIT:
I also tried to open my Android SDK Manager, but this one is disabled in my visual studio. I've installed Xamarin, so it should work:
Any ideas? Thanks.
I tried so many things and finally I have the solution for my problem:
Possible reason for the problem: I just installed the Xamarin, which installes also the JDK, Android SKD and Android NDK in it's wizzard, so I thought this should be the correct versions. After installing Xamarin, I opened my Visual Studio and checked the paths (Tool - Options - Xamarin - Android seetings) for my JDK, SDK and NDK. The paths show on the versions, which were installed by Xamarin. My Android SDK Manager was disabled.
Solution: Then I uninstall everything - the JDK, SDK and NDK and also the whole Xamarin and my old Android Studio. After that, I decided to install the newest JDK from the Java website, the newes Android SDK/NDK from the Android Studio website and a plane xamarin without the sdk/jdk installation. So I could be sure, that I have the correct versions. After the installation, I again opened Visual Studio - Tool - Options - Android seetings and set the paths to the new versions. Than I checked my Android SDK Manager and it was finally enabled and so I installed also the newest Android SDK Tools. After that I cleaned and builded my solution, start it and my android emulator opens my webview page. So I think, the best way is to install the required programms from their website and not automaticlly with xamarin. Now it works. Cheers.
I using Windows 10 and am trying to create a Xamarin.Forms - Blank Xaml App (Xamarin.Forms Portable) project for the first time. I have Visual Studio 2015 Enterprise Update 3 installed and have tried uninstalling, reinstalling, and repairing multiple times.
When I create a project, I get the following errors:
"The name 'InitializeComponent' does not exist in the current context"
"Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled" - for App, Droid, UWP, WinPhone, Windows, and iOS
"The XamlCTask task failed unexpectedly..." - for UWP, WinPhone, Windows, and iOS
I tried this on my work computer and home computer and I had the same issues with both.
I have tried updating Xamarin.Forms nuget to the latest version and the created 36 errors with Droid. I also tried going to c:/users/[YOURNAME]/AppData/Local. Delete the Xamarin folder and that did not solve the issue.
I tried creating other Visual Studio projects that did not involve Xamarin and did not have any issues with those. I know the issue is with Xamarin (probably something with Android) itself, but I don't think that there is anything that I am missing from the install. I tried installing it by first installing Visual Studio, then going to Modify and adding Cross Platform. That didn't work, so I uninstalled then downloaded the Xamarin Installer. I had the same issues with both.
I created a blank Android App and that give me the warning - "aapt.exe" exited with code - 1073741849".
A blank app for iPhone does not give any errors or warnings.
Windows Phone does not give any errors or warnings either.
Any ideas of what I should check for so I can get this working?
Here is a picture of the error that I'm getting
Try updating to the latest version of Forms to get rid of the XamlC errors. Assuming you haven't updated, the template is using a modestly old version. As for the aapt error, if you have the N SDK preview installed, removing that should help. Alternatively, make certain that you have up through API 23 installed.
I tried installing monogame and monodevelop but after downloading and installing the required applications there is no Monogame IDE in my application folder.
What i did was the following:
Started on the monogame download page (http://www.monogame.net/downloads) and followed the corresponding links to download these files for OSX:
Xamarin Studio 4.0.12 installer
Mono + GTK# to which it linked me to the mono download page to which i download
The Runtime and SDK files for OSX Version 2.10.x
I installed each program in the corresponding order and continues the installation process by downloading the MonoGame installation V3.0.1 for Xamarin and MonoDevelop because i wasnt sure which one to get. But when I couldn't simply drag or click to install I looked in my application folder there was no Monogame IDE only the Xamarin Studio IDE which I presume is the correct process. But When I opened the Xamarin IDE it says that I've download the starter version and I cannot use Monogame.
Aside from the monogame website and various googling instructions, I've tried following these very clear instruction from this blog (http://mastrgamr.net/xna/programming-xna-on-mac/) but got stuck when I could find nor open my MonoGame and the Xamarian IDE displaying the correct screen.
I do not understand what I am doing wrong as the installation instructions seem very clear.
EDIT:
So i found out that Xamarian IDE replaced the MonoDeveloper IDE though the instructions I've found are using MonoDeveloper IDE as the example. I'm not sure if theres a significant difference but I presume there is a difference as I still can't seem to run monoGame and the outdated instructions aren't syncretic with my actions. Can anyone provide me with updated Xamarian instructions?
A little while ago Xamarin replaced MonoDevelop with Xamarin Studio. So MonoDevelop is now called Xamarin Studio and it looks and behaves a little different. That's why any tutorials talking about MonoDevelop are going to be a little confusing.
I've never tried to install Xamarin Studio on a Mac so I'm not sure what the error is about the starter version. However, I suspect it might be talking about the Xamarin licensing.
What I can tell you is, you won't be able to develop games with MonoGame on the starter edition if you are targeting platforms other than Windows (this includes Android, iOS and I presume Mac) due to the limited app size. You should consider buying a license from Xamarin if this is indeed your issue.