Xamarin Android的工作室 - 无法创建与最新和最伟大的HelloWorld平台 [英] Xamarin Studio Android - Unable to create HelloWorld with Latest and Greatest Platform

查看:201
本文介绍了Xamarin Android的工作室 - 无法创建与最新和最伟大的HelloWorld平台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个新的项目,选择Android应用程序,最新和最伟大和为主题的材料。另外,我intalling谷歌播放服务。

在此之后,我尝试运行默认创建的应用程序,并得到以下错误(在我的手机和genymotion模拟器)。

  [艺术]晚启用-Xcheck:JNI
[AndroidRuntime]关闭VM
[AndroidRuntime]致命异常:主要
[AndroidRuntime]进程:Memetizame.Memetizame,PID:5804
[AndroidRuntime]了java.lang.RuntimeException:无法获取提供商mono.MonoRuntimeProvider:了java.lang.RuntimeException:无法找到应用程序Mono.Android.Platform.ApiLevel_22或Xamarin.Android.Platform!
[AndroidRuntime]在android.app.ActivityThread.installProvider(ActivityThread.java:4967)
[AndroidRuntime]在android.app.ActivityThread.installContentProviders(ActivityThread.java:4559)
[AndroidRuntime]在android.app.ActivityThread.handleBindApplication(ActivityThread.java:4499)
[AndroidRuntime]在android.app.ActivityThread.access $ 1500(ActivityThread.java:144)
[AndroidRuntime]在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1339)
[AndroidRuntime]在android.os.Handler.dispatchMessage(Handler.java:102)
[AndroidRuntime]在android.os.Looper.loop(Looper.java:135)
[AndroidRuntime]在android.app.ActivityThread.main(ActivityThread.java:5221)
[AndroidRuntime]在java.lang.reflect.Method.invoke(本机方法)
[AndroidRuntime]在java.lang.reflect.Method.invoke(Method.java:372)
[AndroidRuntime]在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:899)
[AndroidRuntime]在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
[AndroidRuntime]产生的原因:了java.lang.RuntimeException:无法找到应用程序Mono.Android.Platform.ApiLevel_22或Xamarin.Android.Platform!
[AndroidRuntime]在mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
[AndroidRuntime]在android.app.ActivityThread.installProvider(ActivityThread.java:4964)
[AndroidRuntime] ... 11个
[AndroidRuntime]致:android.content.pm.PackageManager $的NameNotFoundException:Xamarin.Android.Platform
[AndroidRuntime]在android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:281)
[AndroidRuntime]在mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:32)
[AndroidRuntime] ... 12更多


解决方案

下面是解决问题;

您需要在目标版本的变化(如果您使用的是VS,那么你需要改变编译版太)。

如果您在Xamarin Studio中那么你的项目双击工作; 项目选项会打开,然后单击常规,改变目标版本(选择下拉相应的版本)。

对于Visual Studio,

1)在Solution Explorer中,打开要更改项目的快捷菜单,然后选择属性。

2)在属性窗口中的左侧栏中,选择应用程序选项卡。

3)在编译采用Android版本和目标框架列表中,选择您想要的版本。

4)在出现的确认对话框,选择是按钮。

我希望这个解决方案解决您的问题。

感谢您。

I've created a new project, selected "Android App" , "Latest and Greatest" and as theme "Material". Also, I'm intalling Google Play services.

After this, I try running the app created by default, and get the following error (on my phone and genymotion emulator).

[art] Late-enabling -Xcheck:jni
[AndroidRuntime] Shutting down VM
[AndroidRuntime] FATAL EXCEPTION: main
[AndroidRuntime] Process: Memetizame.Memetizame, PID: 5804
[AndroidRuntime] java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_22 or Xamarin.Android.Platform!
[AndroidRuntime]    at android.app.ActivityThread.installProvider(ActivityThread.java:4967)
[AndroidRuntime]    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4559)
[AndroidRuntime]    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4499)
[AndroidRuntime]    at android.app.ActivityThread.access$1500(ActivityThread.java:144)
[AndroidRuntime]    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
[AndroidRuntime]    at android.os.Handler.dispatchMessage(Handler.java:102)
[AndroidRuntime]    at android.os.Looper.loop(Looper.java:135)
[AndroidRuntime]    at android.app.ActivityThread.main(ActivityThread.java:5221)
[AndroidRuntime]    at java.lang.reflect.Method.invoke(Native Method)
[AndroidRuntime]    at java.lang.reflect.Method.invoke(Method.java:372)
[AndroidRuntime]    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
[AndroidRuntime]    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
[AndroidRuntime] Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_22 or Xamarin.Android.Platform!
[AndroidRuntime]    at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
[AndroidRuntime]    at android.app.ActivityThread.installProvider(ActivityThread.java:4964)
[AndroidRuntime]    ... 11 more
[AndroidRuntime] Caused by: android.content.pm.PackageManager$NameNotFoundException: Xamarin.Android.Platform
[AndroidRuntime]    at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:281)
[AndroidRuntime]    at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:32)
[AndroidRuntime]    ... 12 more

解决方案

Here is the solution to problem;

You need to make changes in "Target Version" ( if you are using VS then you need to change "Compile version" too).

If you are working in Xamarin Studio then double click on you project; "Project Options" will get open then click on "General" And change "Target Version" (Select appropriate version from drop-down).

For Visual Studio,

1)In Solution Explorer, open the shortcut menu for the project that you want to change, and then choose Properties.

2)In the left column of the properties window, choose the Application tab.

3)In the "Compile using Android Version" And Target Framework list, choose the version that you want.

4)In the verification dialog box that appears, choose the Yes button.

I hope this solution solve your problem.

Thank you.

这篇关于Xamarin Android的工作室 - 无法创建与最新和最伟大的HelloWorld平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆