Xamarin Studio Android - 无法使用最新最好的平台创建 HelloWorld [英] Xamarin Studio Android - Unable to create HelloWorld with Latest and Greatest Platform

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

问题描述

我创建了一个新项目,选择Android 应用程序"、最新和最伟大的"并将主题设为材料".另外,我正在安装 Google Play 服务.

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

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

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

推荐答案

您需要在目标版本"中进行更改.(如果您使用的是 Visual Studio,那么您也需要更改编译版本".)

You need to make changes in "Target Version". (If you are using Visual Studio, then you need to change "Compile version" too.)

如果您在 Xamarin Studio 中工作,请双击您的项目;将打开项目选项",然后单击常规"并更改目标版本"(从下拉列表中选择合适的版本).

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

对于 Visual Studio:

For Visual Studio:

  1. 在解决方案资源管理器中,打开要更改的项目的快捷菜单,然后选择属性".

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

在属性窗口的左栏中,选择应用程序选项卡.

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

在使用 Android 版本编译"和目标框架列表中,选择所需的版本.

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

在出现的验证对话框中,选择是"按钮.

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

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

I hope this solution solves your problem.

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

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