Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Error building project with Google Play Services

Hello. I'm working on an Android project whose minimum target version is ICS, so I downloaded the Google Play Services (ICS) component from the component store. After adding references to the 4 dlls, I was unable to build the project, so I did what is mention in this thread: forums.xamarin.com/discussion/15809/issue-building-app-with-google-play-services. My current project 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.

There are also some warnings regarding default translations for strings, but I believe these are irrelevant.

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

And one more question regarding Google Play Services: Since I'm building for ICS, I don't really need to use any of the support libraries (and haven't done so up to this point). Is there any way to use Google Play Services without adding the support libraries as references? The only thing I want to use is a map fragment.

Thanks in advance.

Posts

  • SpyrosBoutsisSpyrosBoutsis USMember ✭✭

    Yes, that was it. It didn't make the warnings go away, but strangely enough the app is built successfully now. I never got an error related to heap size though.

    Thanks!

  • MartinKlepalMartinKlepal IEMember

    I am having the same problem

    100x the same Warnings about the version conflict between the compiler and Google Play Services as Spyros Boutsis above

    Warning 1 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. C:\Test\Components\googleplayservicesjellybean-19.0.0\samples\GooglePlayServicesApp\GooglePlayServicesApp\JAVAC GooglePlayServicesApp

    I tried:
    I increased the Java Heap Size to 1G,
    I installed JDK 7 and set environment variable accordingly on my PC

    Nothing helped so far

    The app still does not run in the emulator in VS or XS. I tried API Level 18 and 19 and set compiler and AVD accordingly

    The VS output says

    Build succeeded.
    Waiting for device..

    and then waits forever..... the AVD never loads the app.

    (the same AVD works ok with other project which does not use Google Play Servies)

    the project with google play services compiles and runs OK on my real Phone Android Kitkat 4.4, though

    any help with these warnings much appreciated...

  • SpyrosBoutsisSpyrosBoutsis USMember ✭✭

    I'm pretty sure this is a different issue, not related to google play services.
    In my case, the small heap size was causing a build error that was not visible in the output log, leading me to believe that the version warnings were the real issue. As soon as I increased the heap size, the build succeeded (although the warnings remained).

    Things you can try:

    1. Create a brand new AVD and see if the issue remains.
    2. Deploy the app on an AVD whose target is one of the "Google APIs" (screenshot attached)
    avd.png 30.9K
  • WilliamJockuschWilliamJockusch USMember ✭✭

    I am seeing this too in Visual Studio. My Java heap size is 1G. Highly annoying -- but it does not stop the app from running.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    I am having this problem too (after adding xamarin.forms.maps in my xamarin.forms-project).
    I also have the over 100 warnings now, but after set 1GB, I am now able to compile...
    I don't feel good with over 100 warnings, error-message: major version 51 is newer than 50, the highest major version supported by this compiler (==> what does this means really?) and set java heap-size to 1 GB (also to this option: what does this means in practice?).
    It would be nice, if some crack from Xamarin would comment this problems...

  • JamesMundyJamesMundy GBMember

    Having this problem too, changing to 1G fixes the problem but I agree, having 104 warnings isn't good.

  • ManInTheLoftManInTheLoft GBBeta, University ✭✭

    Extending the heap size worked for me as well thanks. Like the rest of you I still have the warnings though :(

    CR

  • ChrisPlowmanChrisPlowman USUniversity
    edited October 2014

    I installed JDK 8 because I saw some references that that might resolve the issues and it looked like it did for the first rebuild, but the next time I built they all came back. :(

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    On the basis of another problem (import of an image in the project cause VS to hang), I have updated the Android-sdk.
    This has solved my problem with the image-import and it seems, as it also has solved various warnings.
    As I don't know before, that there is a "Android SDK-Manager" included in VS (one more peace of software;-), I post this information here.
    In VS2013, there is a small icon in top toolbar (to the android-options) named "Start Android SDK-Manager".
    As I don't have known this (and therefore never run in before), I had about 18 updates "waiting".
    I then have installed all pending updates...
    Maybe this helps somebody...

  • DualDubDualDub GBMember ✭✭

    I have update VS 2013 and installed the latest java sdk - still happening. It's very annoying. Will try to update the android sdk

  • I have this issue too.
    Any Xamarin comment?

  • test.3639test.3639 USMember
    edited November 2014

    http://www.veryant.com/support/phpkb/question.php?ID=192

    but i got it working by just disabling java 1.7 and enabling 1.6 ( i .e. from the control panel > java > tab(java) ), cos while installing i remember that xamarin asked me to install older java version.

    After that clean your sln.(and every project) and build it, walla ...

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    I had this issue today while changing a working project from using the Google Play services component to the nuGet package equivalent.

    major version 51 is newer than 50, the highest major version supported by this compiler

    Version 50 stands for JDK version 6. Therefor version 51 is JDK 7. I downloaded it from from Oracle and installed it. After restarting Xamarin Studio and a clean fresh rebuild everything builds fine again.

    If you want to use Google Maps it is necessary to extend the Java heap size to 1G otherwise to project won't build.

  • IanVinkIanVink CAInsider, University ✭✭✭

    I can confirm this worked for me.

    1. Add Google Maps
    2. Update to Java 7 from Oracle's site
    3. Add the 1G heap under properties
    4. Clean solution
    5. Restart VS2013
  • MikeEEEMikeEEE USMember ✭✭✭

    FWIW, this thread had the solution that worked for me.

Sign In or Register to comment.