错误的建筑Xamarin.Android项目与谷歌播放服务 [英] Error building Xamarin.Android project with Google Play Services

查看:252
本文介绍了错误的建筑Xamarin.Android项目与谷歌播放服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Android项目,其最低目标版本是ICS,于是我下载了谷歌从Xamarin组件商店Play服务的ICS组件(版本18.0.0.1)。添加引用它所包含的4 dll文件后,我无法构建项目,所以我不得不在此提到的线程。我目前的设置是:

I'm working on an Android project whose minimum target version is ICS, so I downloaded the Google Play Services ICS component (version 18.0.0.1) from the Xamarin component store. After adding references to the 4 dlls it contains, I was unable to build the project, so I had to adjust the target android versions in my project as mentioned in this thread. My current settings are:

编译使用Android版本:API等级17
Android的最低目标:API等级14
目标的Andr​​oid版本:API等级17

Compile using Android version: API Level 17 Minimum Android to target: API Level 14 Target Android Version: API Level 17

然而,构建过程仍然失败,出现以下错误:

However, the build process still fails with the following errors:

2>JAVAC : warning : com\google\ads\mediation\MediationBannerListener.class(com\google\ads\mediation:MediationBannerListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\ads\mediation\MediationBannerAdapter.class(com\google\ads\mediation:MediationBannerAdapter.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\ads\AdRequest.class(com\google\ads:AdRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\ads\AdRequest$ErrorCode.class(com\google\ads:AdRequest$ErrorCode.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\ads\mediation\MediationInterstitialListener.class(com\google\ads\mediation:MediationInterstitialListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\ads\mediation\MediationInterstitialAdapter.class(com\google\ads\mediation:MediationInterstitialAdapter.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\ads\mediation\customevent\CustomEventListener.class(com\google\ads\mediation\customevent:CustomEventListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\doubleclick\AppEventListener.class(com\google\android\gms\ads\doubleclick:AppEventListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\mediation\MediationBannerListener.class(com\google\android\gms\ads\mediation:MediationBannerListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\mediation\MediationBannerAdapter.class(com\google\android\gms\ads\mediation:MediationBannerAdapter.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\mediation\MediationInterstitialListener.class(com\google\android\gms\ads\mediation:MediationInterstitialListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\mediation\MediationInterstitialAdapter.class(com\google\android\gms\ads\mediation:MediationInterstitialAdapter.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\mediation\customevent\CustomEventListener.class(com\google\android\gms\ads\mediation\customevent:CustomEventListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\purchase\InAppPurchaseListener.class(com\google\android\gms\ads\purchase:InAppPurchaseListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\purchase\InAppPurchase.class(com\google\android\gms\ads\purchase:InAppPurchase.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\purchase\PlayStorePurchaseListener.class(com\google\android\gms\ads\purchase:PlayStorePurchaseListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\ads\purchase\InAppPurchaseResult.class(com\google\android\gms\ads\purchase:InAppPurchaseResult.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\cast\RemoteMediaPlayer.class(com\google\android\gms\cast:RemoteMediaPlayer.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\cast\RemoteMediaPlayer$OnMetadataUpdatedListener.class(com\google\android\gms\cast:RemoteMediaPlayer$OnMetadataUpdatedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\cast\Cast.class(com\google\android\gms\cast:Cast.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\cast\Cast$MessageReceivedCallback.class(com\google\android\gms\cast:Cast$MessageReceivedCallback.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\cast\RemoteMediaPlayer$OnStatusUpdatedListener.class(com\google\android\gms\cast:RemoteMediaPlayer$OnStatusUpdatedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\common\GooglePlayServicesClient.class(com\google\android\gms\common:GooglePlayServicesClient.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\common\GooglePlayServicesClient$OnConnectionFailedListener.class(com\google\android\gms\common:GooglePlayServicesClient$OnConnectionFailedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\common\ConnectionResult.class(com\google\android\gms\common:ConnectionResult.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\common\images\ImageManager.class(com\google\android\gms\common\images:ImageManager.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\common\images\ImageManager$OnImageLoadedListener.class(com\google\android\gms\common\images:ImageManager$OnImageLoadedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\drive\DriveFile.class(com\google\android\gms\drive:DriveFile.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\drive\DriveFile$DownloadProgressListener.class(com\google\android\gms\drive:DriveFile$DownloadProgressListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\drive\DriveResource.class(com\google\android\gms\drive:DriveResource.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\drive\events\DriveEvent.class(com\google\android\gms\drive\events:DriveEvent.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\drive\events\DriveEvent$Listener.class(com\google\android\gms\drive\events:DriveEvent$Listener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\common\internal\safeparcel\SafeParcelable.class(com\google\android\gms\common\internal\safeparcel:SafeParcelable.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\OnInvitationReceivedListener.class(com\google\android\gms\games\multiplayer:OnInvitationReceivedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\Invitation.class(com\google\android\gms\games\multiplayer:Invitation.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\realtime\RealTimeMessageReceivedListener.class(com\google\android\gms\games\multiplayer\realtime:RealTimeMessageReceivedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\realtime\RealTimeMessage.class(com\google\android\gms\games\multiplayer\realtime:RealTimeMessage.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\realtime\RoomStatusUpdateListener.class(com\google\android\gms\games\multiplayer\realtime:RoomStatusUpdateListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\realtime\Room.class(com\google\android\gms\games\multiplayer\realtime:Room.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\realtime\RoomUpdateListener.class(com\google\android\gms\games\multiplayer\realtime:RoomUpdateListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\turnbased\OnTurnBasedMatchUpdateReceivedListener.class(com\google\android\gms\games\multiplayer\turnbased:OnTurnBasedMatchUpdateReceivedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\multiplayer\turnbased\TurnBasedMatch.class(com\google\android\gms\games\multiplayer\turnbased:TurnBasedMatch.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\quest\QuestUpdateListener.class(com\google\android\gms\games\quest:QuestUpdateListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\quest\Quest.class(com\google\android\gms\games\quest:Quest.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\request\OnRequestReceivedListener.class(com\google\android\gms\games\request:OnRequestReceivedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\games\request\GameRequest.class(com\google\android\gms\games\request:GameRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\location\LocationClient.class(com\google\android\gms\location:LocationClient.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\location\LocationClient$OnAddGeofencesResultListener.class(com\google\android\gms\location:LocationClient$OnAddGeofencesResultListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\location\LocationClient$OnRemoveGeofencesResultListener.class(com\google\android\gms\location:LocationClient$OnRemoveGeofencesResultListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\location\LocationListener.class(com\google\android\gms\location:LocationListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap.class(com\google\android\gms\maps:GoogleMap.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnCameraChangeListener.class(com\google\android\gms\maps:GoogleMap$OnCameraChangeListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\model\CameraPosition.class(com\google\android\gms\maps\model:CameraPosition.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnIndoorStateChangeListener.class(com\google\android\gms\maps:GoogleMap$OnIndoorStateChangeListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\model\IndoorBuilding.class(com\google\android\gms\maps\model:IndoorBuilding.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnInfoWindowClickListener.class(com\google\android\gms\maps:GoogleMap$OnInfoWindowClickListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\model\Marker.class(com\google\android\gms\maps\model:Marker.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnMapClickListener.class(com\google\android\gms\maps:GoogleMap$OnMapClickListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\model\LatLng.class(com\google\android\gms\maps\model:LatLng.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnMapLongClickListener.class(com\google\android\gms\maps:GoogleMap$OnMapLongClickListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnMarkerClickListener.class(com\google\android\gms\maps:GoogleMap$OnMarkerClickListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnMarkerDragListener.class(com\google\android\gms\maps:GoogleMap$OnMarkerDragListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnMyLocationButtonClickListener.class(com\google\android\gms\maps:GoogleMap$OnMyLocationButtonClickListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\GoogleMap$OnMyLocationChangeListener.class(com\google\android\gms\maps:GoogleMap$OnMyLocationChangeListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\LocationSource.class(com\google\android\gms\maps:LocationSource.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\LocationSource$OnLocationChangedListener.class(com\google\android\gms\maps:LocationSource$OnLocationChangedListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\StreetViewPanorama.class(com\google\android\gms\maps:StreetViewPanorama.class): major version 51 is newer than 50, the highest major version supported by this compiler.
2>JAVAC : warning : com\google\android\gms\maps\StreetViewPanorama$OnStreetViewPanoramaCameraChangeListener.class(com\google\android\gms\maps:StreetViewPanorama$OnStreetViewPanoramaCameraChangeListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.

时此主题相关的我的电脑上的JDK版本?任何想法?

Is this somehow related to the JDK version on my PC? Any ideas?

先谢谢了。

推荐答案

我有一个类似的问题。从Android相关的计算器参考我发现,'主版本是指Java版本。 Java 7的51例,爪哇6 = 50(<一href=\"http://stackoverflow.com/questions/24807117/android-studio-what-compiler-settings-when-including-google-maps\">Android演播室:什么编译器设置,包括谷歌地图时)。这是说,它正在使用(你的情况JDK 6)编译器还不够高。

I was having a similar issue. From an android related stackoverflow reference I discovered that ' "Major version" means Java version. Java 7 = 51, Java 6 = 50. ' (Android Studio: what compiler settings when including Google Maps) . It is saying that the compiler it is using (in your case JDK 6) is not high enough.

首先,你要确保你有Java开发工具包已安装的Java 7版本。在我的情况下,它已经安装但仍在使用的版本6。

First you want to make sure you have Java Development Kit for version 7 of Java installed. In my case it was already installed however the version 6 was still being used.

在Xamarin Studio中,您可以可以在选项/ preferences - >项目 - > SDK位置指向JDK位置为第7版

In Xamarin Studio, you can can go to Options/Preferences -> Projects -> SDK Locations to point to the JDK location for the version 7.

在与Xamarin插件视觉工作室我无法弄清楚如何指定与JDK 7编译因此,我从我的计算机中删除第6版,现在code编译。

In Visual Studios with Xamarin Plugin I was unable to figure out how to specify to compile with JDK 7. I therefore deleted version 6 from my computer and now the code compiles.

这篇关于错误的建筑Xamarin.Android项目与谷歌播放服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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