6

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:

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.

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

Thanks in advance.

vbm
  • 112
  • 1
  • 7

2 Answers2

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.

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.

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

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.

Community
  • 1
  • 1
  • 1
    That made the warnings go away when using Xamarin Studio. Still wondering how the JDK path can be set in Visual Studio though... – vbm Jul 22 '14 at 19:04
  • 1
    Still searching, but I agree that my answer isn't complete without knowing how to set the path in VS. – Sleepless Ninja Jul 23 '14 at 13:25
  • For some reason I cannot specify a new JDK.. I get [this error](http://i.imgur.com/MztPP8R.png) – JKennedy Oct 10 '14 at 10:00
  • @user1- the reason it isn't working is that you're targeting a jre there- a java run time environment. You need to be specifying a jdk- a java development kit. If you think you already have downloaded a valid jdk but don't see it, make sure you check both your 64 AND your 32 bit (x86) program files Else, [download jdk 8 here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). – chriszumberge Jan 28 '15 at 13:48
0

I encounter the same problem and changing to the JDK 7 partially solved that problem. I already publish my app on the google play store but found out that some smartphones could not handle the signing of the JDK 7. The error "Package file was not signed correctly” appears when downloading the app on those phones.

xamarin.android App signing does not work

If changing to JDK 7 causes this problem, perhaps there is another way to solve this problem.

Community
  • 1
  • 1
user1261620
  • 377
  • 2
  • 5
  • 12