Xamarin-Studio Android Form Designer: Android Version not installed

Recently, I took an interest in Xamarin, a system used for running C# code on both mobile and stationary devices. After setting up my Android environment using the Xamarin Studio ( a modified version of the popular IDE MonoDevelop), I had a few problems which I managed to fix, this being one that I've spent some time working on to no avail.

Problem

After creating an application, and opening the Main.axml file where the Layout of the app is stored, I get this message instead.

http://i.stack.imgur.com/7cjsN.png

Here is the XML code associated with the form.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <Button
        android:id="@+id/myButton"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />
</LinearLayout>

Obviously, this is a problem, as I can't design Android forms with this message. One notable thing is that it says 'Android 4.4 (v10) on the top panel. I am using the most recent SDK from the Android site (http://developer.android.com/sdk/index.html), so I am confused as to why it is telling me that the Android Version is not installed.

A few things I've tried

When designing forms in Xamarin, it gives you a sample emulated system to build your forms off of, in order to determine the size of the screen and other possible associated variables. It gives you the option between various Nexus devices where you can build your forms. I tried switching devices, but I still receive the error message.

I've re-installed the SDK and also done a fresh install of Xamarin itself. These solutions helped with a few of my other problems, but this one has been persistent.

Conclusion

Why is Xamarin giving me this message? What is the problem? Please let me know if you need any other information.

  • Your problem may be that Android 4.4 hasn't been released yet, so it is still buggy. Try using a different version, preferably 4.3 –  Pip Nov 23 '13 at 21:33
  • You said you reinstalled everything. While reinstalling, have you by any chance, let the Xamarin Studio setup kit install the Android SDK for you instead of finding an already installed one ? Furthermore, and let it be known that I simply adore Xamarin (I'm using it for iOS development where I'm stuck with their IDE), since you're developing for Android and not for iOS you are allowed to do it on a Windows machine. I would suggest (at least until they get all of their bugs fixed) using Visual Studio instead, and also making sure that VS is installed when installing Xamarin Studio –  Eduard Dumitru Nov 23 '13 at 21:51
  • In case it wasn't clear enough, my suggestions are: Use VS, not XS and reinstall things in this order: 1. Visual Studio , 2. Xamarin Studio and 3. let the Xamarin Studio setup discover the lack of Android SDK while it's installing Xamarin Studio itself and let it install it for you. Already having VS would not make it necessary to reinstall VS, but installing VS after XS would make it necessary to uninstall XS and the reinstall it after VS –  Eduard Dumitru Nov 23 '13 at 21:52
  • @EduardDumitru Indeed, I did let it install Android SDK for me. I didn't think it would cause this much of a problem for me. Would you care to elaborate on this? I don't think I am permitted to use VS as I am only using their Free plan. –  hasherr Nov 23 '13 at 21:55
  • No no.. I tried to make it clearer in my second comment. Please excuse my clumsy ways. It's good that you did that. It would've been worse not doing so. That leaves me with saying: I have no clue, Hope someone who uses that version of Android SDK + Xamarin sees your question ! And the VS stuff is just a hunch. The things I'm certain of is that VS is not as bad a text editor as is XS. I'm sorry I had forgotten about their new pricing plans. Originally they would not do this. I suspect you will be moving to Indie (like I did) pretty soon anyway, since you have an absurd app footprint limit –  Eduard Dumitru Nov 23 '13 at 21:57
up vote 1 down vote accepted

So, this was weird to figure out. Here's what I did.

The Fix

I was using the Android 4.4 (KitKat) SDK because that was the most recent SDK. After searching around for a bit, I finally found a conclusion, mainly through trial-and-error and a the help of a few people. As of this point, I guess that Xamarin Studio is not compatible/doesn't run well with Android 4.4. All I had to do to fix it was re-install packages from Android 4.3 (Jelly Bean) and then use the SDK with 4.3 packages instead of the new 4.4 packages (You can find an explanation on how to do this here). I'm sure this isn't a lasting bug, as eventually Xamarin Studio will be compatible with Android 4.4.

If anybody is ever having problems with this in the future, the solution here is fairly simple. Simply use an SDK from a previous version.

其实主要是ANDROID SDK的版本混乱造成的,可以将SDK目录中平台下的相关高版本删除即可,同时注意项目属性上的设置。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值