Google Play Services 25.0.0.0, must use the "all" package?

Yesterday, I updated to the latest Google Play Services component. Worked fine, but with lots of unnecessary packages (the "all" package).

Today, I'm trying to pare-down the package references. All I need are ads right now, so I'm down to Xamarin.GooglePlayServices.Base and Xamarin.GooglePlayServices.Ads (Ads depends only on Base).

For my Release build, I get 1 build error:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task ResolveAssemblyReference: Could not load file or assembly '[project dir]/bin/Release/GooglePlayServicesLib.dll' or one of its dependencies. The system cannot find the file specified.

And, indeed, the file GooglePlayServicesLib.dll isn't in the bin directory.

The Debug build actually builds (and GooglePlayServicesLib.dll is still NOT in the bin directory), but then, when it tries to display an ad, it throws Java.Lang.NoClassDefFoundErr:

Java.Lang.NoClassDefFoundError: com.google.android.gms.internal.zzan
  at at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x0004b>
  at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue*) [0x00063] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:571
  at at Android.Gms.Ads.AdView.LoadAd (Android.Gms.Ads.AdRequest) <IL 0x00050, 0x0016f>
  at Shinro.Android.MainActivity.OnCreate (Android.OS.Bundle) [0x00160] in /Users/Sherman/Library/Mobile Documents/com~apple~CloudDocs/Shinro/Shinro.Android/MainActivity.cs:100
  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2707
  at at (wrapper dynamic-method) object.7ad917f2-72d2-40c0-922b-82b2c94f2311 (intptr,intptr,intptr) <IL 0x00017, 0x00027>
  at --- End of managed exception stack trace ---
  at java.lang.NoClassDefFoundError: com.google.android.gms.internal.zzan
  at at com.google.android.gms.ads.internal.zzp.<init>(Unknown Source)
  at at com.google.android.gms.ads.internal.zzp.<init>(Unknown Source)
  at at com.google.android.gms.ads.internal.zzb.<init>(Unknown Source)
  at at com.google.android.gms.ads.internal.zzc.<init>(Unknown Source)
  at at com.google.android.gms.ads.internal.zze.<init>(Unknown Source)
  at at com.google.android.gms.ads.internal.client.zze.zza(Unknown Source)
  at at com.google.android.gms.ads.internal.client.zzy.zzcO(Unknown Source)
  at at com.google.android.gms.ads.internal.client.zzy.zza(Unknown Source)
  at at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
  at at md532f18535a27b6d2eeddf3e5c44fd32f4.MainActivity.n_onCreate(Native Method)
  at at md532f18535a27b6d2eeddf3e5c44fd32f4.MainActivity.onCreate(MainActivity.java:28)
  at at android.app.Activity.performCreate(Activity.java:5008)
  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
  at at android.app.ActivityThread.access$600(ActivityThread.java:130)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
  at at android.os.Handler.dispatchMessage(Handler.java:99)
  at at android.os.Looper.loop(Looper.java:137)
  at at android.app.ActivityThread.main(ActivityThread.java:4745)
  at at java.lang.reflect.Method.invokeNative(Native Method)
  at at java.lang.reflect.Method.invoke(Method.java:511)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  at at dalvik.system.NativeStart.main(Native Method)

I feel like (and hope) I'm missing something dumb. Any help here would be greatly appreciated. I can't imagine that using Google Play Services without the "all" package wasn't tested extensively, so I'm at a loss for what could be going on.

Posts

  • TomStandaert.0575TomStandaert.0575 BEMember ✭✭

    Even bigger problem here, because Xamarin.googleplayservices downloads all packages and xamarin.forms.maps downloads googleplayservices I get way too many dependencies in my project. This results in:

    C:\Program Files\Java\jdk1.8.0_05\\bin\java.exe -Xmx1G -jar D:\android-studio\sdk\build-tools\22.0.1\\lib\dx.jar --no-strict --dex --output=obj\Debug\android\bin obj\Debug\android\bin\classes "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\mono.android.jar" E:\prophets_git\krumb\web\NET_web_layer\KrumbAndroid\obj\Debug\__library_projects__\Estimotes.Xamarin.Android\library_project_imports\estimote-sdk-preview.jar E:\prophets_git\krumb\web\NET_web_layer\KrumbAndroid\obj\Debug\__library_projects__\FormsViewGroup\library_project_imports\formsviewgroup.jar E:\prophets_git\krumb\web\NET_web_layer\KrumbAndroid\obj\Debug\__library_projects__\OkHttp\library_project_imports\okhttp-2.3.0-jar-with-dependencies.jar E:\prophets_git\krumb\web\NET_web_layer\KrumbAndroid\obj\Debug\__library_projects__\Xamarin.Facebook\library_project_imports\AudienceNetwork.jar E:\prophets_git\krumb\web\NET_web_layer\KrumbAndroid\obj\Debug\__library_projects__\Xamarin.Facebook\library_project_imports\bolts.jar E:\prophets_git\krumb\web\NET_web_layer\KrumbAndroid\obj\Debug\__library_projects__\Xamarin.Facebook\library_project_imports\bin\classes.jar C:\Users\Tom\AppData\Local\Xamarin\Android.Support.v4\22.2.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\Android.Support.v4\22.2.0\embedded\libs\internal_impl-22.2.0.jar C:\Users\Tom\AppData\Local\Xamarin\Android.Support.v7.AppCompat\22.2.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\22.2.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\22.2.0\embedded\libs\internal_impl-22.2.0.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Ads\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Analytics\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.AppIndexing\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.AppInvite\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.AppState\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Base\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Cast\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Drive\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Fitness\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Games\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Gcm\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Identity\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Location\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Maps\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Nearby\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Panorama\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Plus\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.SafetyNet\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Wallet\25.0.0\embedded\classes.jar C:\Users\Tom\AppData\Local\Xamarin\GooglePlayServices.Wearable\25.0.0\embedded\classes.jar 
    
    
    
    trouble writing output: Too many field references: 67760; max is 65536.
    
    You may try using --multi-dex option.
    
    References by package:
    
         3 android.accounts
    
        28 android.app
    
         3 android.content
    
        41 android.content.pm
    
         5 android.content.res
    
         3 android.database
    
        37 android.graphics
    
         1 android.location
    
         1 android.media
    
         1 android.net
    
        25 android.os
    
         3 android.print
    
         1 android.provider
    
      1894 android.support.v4
    
        13 android.support.v4.accessibilityservice
    
        16 android.support.v4.animation
    
       737 android.support.v4.app
    
       101 android.support.v4.content
    
         1 android.support.v4.content.pm
    
         3 android.support.v4.graphics
    
        27 android.support.v4.graphics.drawable
    
         4 android.support.v4.hardware.display
    
         9 android.support.v4.internal.view
    
       128 android.support.v4.media
    
        18 android.support.v4.media.routing
    
       258 android.support.v4.media.session
    
         5 android.support.v4.net
    
         4 android.support.v4.os
    
        49 android.support.v4.print
    
         9 android.support.v4.provider
    
         5 android.support.v4.speech.tts
    
        52 android.support.v4.text
    
        74 android.support.v4.util
    
       373 android.support.v4.view
    
        80 android.support.v4.view.accessibility
    
         8 android.support.v4.view.animation
    
       449 android.support.v4.widget
    
       317 android.support.v7.app
    
      1894 android.support.v7.appcompat
    
         1 android.support.v7.graphics.drawable
    
        81 android.support.v7.internal.app
    
         1 android.support.v7.internal.text
    
         2 android.support.v7.internal.transition
    
        75 android.support.v7.internal.view
    
       191 android.support.v7.internal.view.menu
    
       416 android.support.v7.internal.widget
    
       401 android.support.v7.media
    
      1894 android.support.v7.mediarouter
    
         2 android.support.v7.view
    
       416 android.support.v7.widget
    
         5 android.text
    
        10 android.util
    
        16 android.view
    
         4 android.view.accessibility
    
         5 android.webkit
    
        15 android.widget
    
       144 bolts
    
        40 com.estimote.sdk
    
        47 com.estimote.sdk.connection
    
        25 com.estimote.sdk.internal
    
        73 com.estimote.sdk.service
    
        11 com.estimote.sdk.utils
    
      2267 com.facebook
    
       184 com.facebook.ads
    
       108 com.facebook.ads.internal
    
         6 com.facebook.ads.internal.action
    
       104 com.facebook.ads.internal.adapters
    
        14 com.facebook.ads.internal.adapters.view
    
         8 com.facebook.ads.internal.config
    
         1 com.facebook.ads.internal.controllers
    
         2 com.facebook.ads.internal.dev
    
        47 com.facebook.ads.internal.dto
    
        28 com.facebook.ads.internal.http
    
        37 com.facebook.ads.internal.server
    
        69 com.facebook.ads.internal.util
    
        53 com.facebook.ads.internal.view
    
         8 com.facebook.ads.internal.view.component
    
       142 com.facebook.appevents
    
        42 com.facebook.applinks
    
       504 com.facebook.internal
    
       119 com.facebook.login
    
        78 com.facebook.login.widget
    
        32 com.facebook.messenger
    
        48 com.facebook.share
    
       305 com.facebook.share.internal
    
        87 com.facebook.share.model
    
       119 com.facebook.share.widget
    
        25 com.google.ads
    
        12 com.google.ads.mediation
    
        11 com.google.ads.mediation.customevent
    
      1888 com.google.android.gms
    
        20 com.google.android.gms.actions
    
      1922 com.google.android.gms.ads
    
        12 com.google.android.gms.ads.doubleclick
    
        11 com.google.android.gms.ads.formats
    
        13 com.google.android.gms.ads.identifier
    
       146 com.google.android.gms.ads.internal
    
       139 com.google.android.gms.ads.internal.client
    
        58 com.google.android.gms.ads.internal.formats
    
        89 com.google.android.gms.ads.internal.overlay
    
        48 com.google.android.gms.ads.internal.purchase
    
       144 com.google.android.gms.ads.internal.request
    
        15 com.google.android.gms.ads.internal.reward.client
    
         6 com.google.android.gms.ads.internal.reward.mediation.client
    
         7 com.google.android.gms.ads.internal.util.client
    
         3 com.google.android.gms.ads.mediation
    
         1 com.google.android.gms.ads.mediation.admob
    
         9 com.google.android.gms.ads.mediation.customevent
    
         7 com.google.android.gms.ads.purchase
    
        43 com.google.android.gms.ads.search
    
      1967 com.google.android.gms.analytics
    
        14 com.google.android.gms.analytics.ecommerce
    
       228 com.google.android.gms.analytics.internal
    
        82 com.google.android.gms.appdatasearch
    
      1914 com.google.android.gms.appindexing
    
      1895 com.google.android.gms.appinvite
    
      1927 com.google.android.gms.appstate
    
        29 com.google.android.gms.auth
    
        17 com.google.android.gms.auth.api
    
        36 com.google.android.gms.auth.api.credentials
    
        20 com.google.android.gms.auth.api.credentials.internal
    
        23 com.google.android.gms.auth.api.proxy
    
      2321 com.google.android.gms.cast
    
        18 com.google.android.gms.cast.games
    
        99 com.google.android.gms.cast.internal
    
       160 com.google.android.gms.common
    
       197 com.google.android.gms.common.api
    
        42 com.google.android.gms.common.data
    
        47 com.google.android.gms.common.images
    
       135 com.google.android.gms.common.internal
    
         1 com.google.android.gms.common.internal.safeparcel
    
         4 com.google.android.gms.common.server
    
        12 com.google.android.gms.common.server.converter
    
        33 com.google.android.gms.common.server.response
    
        39 com.google.android.gms.common.stats
    
      2002 com.google.android.gms.drive
    
        53 com.google.android.gms.drive.events
    
       353 com.google.android.gms.drive.internal
    
        11 com.google.android.gms.drive.metadata
    
        21 com.google.android.gms.drive.metadata.internal
    
        38 com.google.android.gms.drive.query
    
        61 com.google.android.gms.drive.query.internal
    
        35 com.google.android.gms.drive.realtime.internal
    
        68 com.google.android.gms.drive.realtime.internal.event
    
         7 com.google.android.gms.drive.widget
    
        27 com.google.android.gms.dynamic
    
      2073 com.google.android.gms.fitness
    
       337 com.google.android.gms.fitness.data
    
         6 com.google.android.gms.fitness.internal.service
    
       262 com.google.android.gms.fitness.request
    
        55 com.google.android.gms.fitness.result
    
        11 com.google.android.gms.fitness.service
    
      2055 com.google.android.gms.games
    
        26 com.google.android.gms.games.achievement
    
        79 com.google.android.gms.games.appcontent
    
        15 com.google.android.gms.games.event
    
       201 com.google.android.gms.games.internal
    
       336 com.google.android.gms.games.internal.api
    
         1 com.google.android.gms.games.internal.constants
    
         3 com.google.android.gms.games.internal.data
    
         7 com.google.android.gms.games.internal.events
    
         4 com.google.android.gms.games.internal.experience
    
         9 com.google.android.gms.games.internal.game
    
         3 com.google.android.gms.games.internal.multiplayer
    
         1 com.google.android.gms.games.internal.notification
    
        35 com.google.android.gms.games.internal.player
    
         8 com.google.android.gms.games.internal.request
    
        61 com.google.android.gms.games.leaderboard
    
        64 com.google.android.gms.games.multiplayer
    
        41 com.google.android.gms.games.multiplayer.realtime
    
        50 com.google.android.gms.games.multiplayer.turnbased
    
        58 com.google.android.gms.games.quest
    
        36 com.google.android.gms.games.request
    
        49 com.google.android.gms.games.snapshot
    
      1976 com.google.android.gms.gcm
    
      1888 com.google.android.gms.identity
    
        18 com.google.android.gms.identity.intents
    
        20 com.google.android.gms.identity.intents.model
    
        46 com.google.android.gms.iid
    
      2800 com.google.android.gms.internal
    
      2015 com.google.android.gms.location
    
        11 com.google.android.gms.location.copresence.internal
    
       105 com.google.android.gms.location.internal
    
       233 com.google.android.gms.location.places
    
       124 com.google.android.gms.location.places.internal
    
        21 com.google.android.gms.location.places.personalized
    
         3 com.google.android.gms.location.places.personalized.internal
    
         2 com.google.android.gms.location.places.ui
    
      2026 com.google.android.gms.maps
    
        37 com.google.android.gms.maps.internal
    
       149 com.google.android.gms.maps.model
    
        25 com.google.android.gms.maps.model.internal
    
      1898 com.google.android.gms.nearby
    
         6 com.google.android.gms.nearby.bootstrap
    
        42 com.google.android.gms.nearby.bootstrap.request
    
        18 com.google.android.gms.nearby.connection
    
        26 com.google.android.gms.nearby.messages
    
        46 com.google.android.gms.nearby.messages.internal
    
        16 com.google.android.gms.nearby.sharing
    
        28 com.google.android.gms.nearby.sharing.internal
    
      1892 com.google.android.gms.panorama
    
        30 com.google.android.gms.playlog.internal
    
      1941 com.google.android.gms.plus
    
        32 com.google.android.gms.plus.internal
    
        68 com.google.android.gms.plus.internal.model.moments
    
        96 com.google.android.gms.plus.internal.model.people
    
        62 com.google.android.gms.plus.model.moments
    
        23 com.google.android.gms.plus.model.people
    
      1896 com.google.android.gms.safetynet
    
        14 com.google.android.gms.search
    
         5 com.google.android.gms.security
    
        23 com.google.android.gms.signin.internal
    
       414 com.google.android.gms.tagmanager
    
      2103 com.google.android.gms.wallet
    
        13 com.google.android.gms.wallet.firstparty
    
        72 com.google.android.gms.wallet.fragment
    
        64 com.google.android.gms.wallet.wobs
    
      1981 com.google.android.gms.wearable
    
       311 com.google.android.gms.wearable.internal
    
       342 com.squareup.okhttp
    
        86 com.squareup.okhttp.internal
    
       126 com.squareup.okhttp.internal.http
    
         1 com.squareup.okhttp.internal.io
    
       243 com.squareup.okhttp.internal.spdy
    
        11 com.squareup.okhttp.internal.tls
    
         1 com.xamarin.forms.platform.android
    
      1888 eu.krumb.android
    
        22 java.lang
    
         7 java.lang.annotation
    
         1 java.math
    
         6 java.net
    
         6 java.util
    
         7 java.util.concurrent
    
         3 java.util.logging
    
         2 md50575d4ab16fc336ade1879255cf984b5
    
         2 md51a3f41680dae00578dc2892823941114
    
         4 md523429f28dd02a990195829ee70069e82
    
         8 md526b7ac14cffc1a788e82c7b73f3add08
    
         8 md52ce486a14f4bcd95899665e9d932190b
    
         2 md535bdad051ab937b588770c20eabc9ab6
    
         4 md54c41ca4785ad02c80f6b3f4c8af682e0
    
       150 md5530bd51e982e6e7b340b73e88efe666e
    
         6 md555691f64b98059b48c2227278b6d2b9c
    
        80 md58a34ed42530c87c08aa30bc3063d4103
    
         2 md5a482dd8a33889da679c2f724a599a5e2
    
         2 md5c3f794aca97c55dc0e6d5992e563f700
    
         6 md5cd899376b557e28a5e08a2868273bf5c
    
         2 md5ec31a990cf5451cf96df51948e17f720
    
         5 mono
    
         2 mono.android.accounts
    
        12 mono.android.animation
    
        28 mono.android.app
    
         2 mono.android.bluetooth
    
        20 mono.android.content
    
         2 mono.android.database.sqlite
    
         6 mono.android.drm
    
         6 mono.android.gesture
    
         2 mono.android.graphics
    
         8 mono.android.hardware
    
         2 mono.android.hardware.display
    
         2 mono.android.hardware.input
    
         2 mono.android.inputmethodservice
    
         6 mono.android.location
    
        44 mono.android.media
    
        16 mono.android.media.audiofx
    
         2 mono.android.media.effect
    
         2 mono.android.media.session
    
         2 mono.android.media.tv
    
         2 mono.android.net
    
         6 mono.android.net.nsd
    
         2 mono.android.net.sip
    
        16 mono.android.net.wifi.p2p
    
         8 mono.android.os
    
        10 mono.android.preference
    
         2 mono.android.renderscript
    
         6 mono.android.runtime
    
         6 mono.android.sax
    
         2 mono.android.speech
    
         4 mono.android.speech.tts
    
         2 mono.android.support.v4.app
    
         2 mono.android.support.v4.content
    
         2 mono.android.support.v4.media.session
    
        14 mono.android.support.v4.view
    
         6 mono.android.support.v4.widget
    
         6 mono.android.support.v7.app
    
        12 mono.android.support.v7.internal.widget
    
        16 mono.android.support.v7.widget
    
         2 mono.android.text
    
         2 mono.android.transition
    
        60 mono.android.view
    
         4 mono.android.view.accessibility
    
         2 mono.android.view.animation
    
         2 mono.android.view.textservice
    
         8 mono.android.webkit
    
        72 mono.android.widget
    
         8 mono.com.estimote.sdk
    
         6 mono.com.facebook.ads
    
         4 mono.com.facebook.ads.internal.adapters
    
         6 mono.com.facebook.internal
    
         2 mono.com.facebook.login.widget
    
         2 mono.com.facebook.share.widget
    
         4 mono.com.google.ads.mediation
    
         2 mono.com.google.ads.mediation.customevent
    
         4 mono.com.google.android.gms.ads.doubleclick
    
         8 mono.com.google.android.gms.ads.formats
    
         4 mono.com.google.android.gms.ads.mediation
    
         2 mono.com.google.android.gms.ads.mediation.customevent
    
         4 mono.com.google.android.gms.ads.purchase
    
         2 mono.com.google.android.gms.ads.reward
    
         2 mono.com.google.android.gms.ads.reward.mediation
    
         8 mono.com.google.android.gms.cast
    
         2 mono.com.google.android.gms.cast.games
    
         2 mono.com.google.android.gms.common.api
    
         2 mono.com.google.android.gms.common.images
    
         2 mono.com.google.android.gms.drive
    
         2 mono.com.google.android.gms.fitness.request
    
         2 mono.com.google.android.gms.games.multiplayer
    
         6 mono.com.google.android.gms.games.multiplayer.realtime
    
         2 mono.com.google.android.gms.games.multiplayer.turnbased
    
         2 mono.com.google.android.gms.games.quest
    
         2 mono.com.google.android.gms.games.request
    
         2 mono.com.google.android.gms.location
    
        28 mono.com.google.android.gms.maps
    
         6 mono.com.google.android.gms.nearby.connection
    
         2 mono.com.google.android.gms.plus
    
         2 mono.com.google.android.gms.security
    
         2 mono.com.google.android.gms.tagmanager
    
         4 mono.com.google.android.gms.wallet.fragment
    
        10 mono.com.google.android.gms.wearable
    
         4 mono.java.lang
    
         2 mono.java.util
    
         2 mono.javax.xml.transform
    
        81 okio
    
         2 opentk
    
         2 opentk.platform.android
    
         2 opentk_1_0
    
         2 opentk_1_0.platform.android
    
         1 org.apache.http
    
         1 org.apache.http.conn.ssl
    
         1 org.json
    
    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1661,3): error MSB6006: java.exe is afgesloten met code 2.
    

    Done building target "_CompileToDalvik" in project "eu.krumb.android.csproj" -- FAILED.

  • TomStandaert.0575TomStandaert.0575 BEMember ✭✭

    And so every time I see a xamarin update or nuget packages update from xamarin I cross my fingers and pray, most of the time it breaks something :(

  • ShermanUitzetterShermanUitzetter USMember ✭✭

    And so every time I see a xamarin update or nuget packages update from xamarin I cross my fingers and pray, most of the time it breaks something :(

    I never do an update without first doing a full backup of my solution, so that reverting is easy. Of course that's not so easy when it's a tool update (Xamarin Studio or something like that).

    This time, however, I'm pretty sure I'm overlooking something. I mean... the main deal with this update is that the GPS package got split into 16(ish) different packages. You know that got tested-out.

  • ShermanUitzetterShermanUitzetter USMember ✭✭

    This morning's Xamarin updates have fixed my build error. I'm not sure if there was an actual fix in the updates or if something just got reset during the update process, to where it started working correctly again.

    The runtime exception I was seeing was due to the fact that I was trying to run on a Kit Kat device - API 21 is required in the new GPS. I don't know why I didn't think about that before updating. I need to support Kit Kat (and I'd even like Jelly Bean) so... revert all the things! No, just the GPS packages.

  • ShermanUitzetterShermanUitzetter USMember ✭✭

    Now that I've reverted back to Xamarin.GooglePlayServices version 22.0.0.2, everything's working fine, but I just realized what prompted me to update to 25.0.0.0 in the first place. The 22.0.0.2 package is telling me there's an update (of course). I guess I'm anal about it, but that really bugs me. For me, the update is a breaking change - I can't abandon the old APIs. I kinda wish Xamarin Studio had an "Ignore this Update" option.

  • AxelCharpentierAxelCharpentier FRMember ✭✭

    Got the same problem, downloading standalone Google Play Map package 25.0.0.0 make the compilation fail with bunch of "Attribut "XXXX" has already been defined" in maps_attrs.xml.

    Had to update to the full package to build successfully.... kind of weird and annoying to have to include all those useless packages...

  • ShaneNeuvilleShaneNeuville USUniversity ✭✭

    Same here...

    I had to remove them all because I was getting this error
    "trouble writing output: Too many field references: 67760; max is 65536."

    I tried just adding what I needed but then just got a bunch of exceptions..

    is this a confirmed bug with this version of google play services? Or is the expectation that you are just supposed to add them all?

  • PedroNeves.7715PedroNeves.7715 USMember ✭✭
    edited July 2015

    I am trying to test the maps api and i keep getting errors... Now i'm stuck at:

    Error 13 The "CreateAdditionalLibraryResourceCache" task failed unexpectedly.
    System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\User\documents\visual studio 2013\Projects\MvvmTest2\packages**Xamarin.GooglePlayServices.22.0.0.0**\lib\MonoAndroid41\22.0.0\embedded'.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

    The thing is, google play services was automatically downloaded when installing Forms.Maps. And it downloaded 25.0, not 22.0.

  • MatthewLeboMatthewLebo USMember ✭✭

    I had this same issue when I downloaded google play services from the component store. I found the best solution was to remove the component store version. remove everything from packages and then right click packages to access nuget and only select the google play components i needed (such as google play services, base, maps and location). This solved my build errors and issues.

  • SuchithSuchith INMember ✭✭✭

    @digitalml thanks for your comment. it helped me to solve google play service issue after update .

  • SteveSykesSteveSykes USMember ✭✭
    edited August 2015

    I'm glad I ran across this. I feel like I'm back in the 90's with DLL hell. Silly it installs every single possible service. I also cross my fingers when having to download any new things from Nuget. I don't know if its a bad design or just hasn't matured yet but its very annoying to spend more time resolving zero byte zips and mismatched versions etc. than actually developing. Spent 4 hours this morning trying to simply get maps installed.

  • JustinTothJustinToth USMember ✭✭

    I was getting the "too many field references" error too after updating google play services and it forcing me to install EVERY SINGLE package... I tried removing them all and just installing the ones I wanted, however it would error that I needed a google play services dll, which there isn't one besides the base option in Nuget. I ended up having to revert my updates and going back to v22.

    Xamarin needs to start testing their updates....

  • KenYeeKenYee USMember ✭✭

    And if you turn on Multi-Dex to try to work around this, I get:
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 2. Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Library dex files are not supported in multi-dex mode
    at com.android.dx.command.dexer.Main.runMultiDex(Main.java:337)
    at com.android.dx.command.dexer.Main.run(Main.java:243)
    at com.android.dx.command.dexer.Main.main(Main.java:214)
    at com.android.dx.command.Main.main(Main.java:106)

    FUBAR.
    Can't remove any of of the subpackage references either.

  • KenYeeKenYee USMember ✭✭

    and there's no way to turn off pre-dexing in any of the library options so I can't do this:
    http://stackoverflow.com/questions/25696933/android-gradle-dexexception-library-dex-files-are-not-supported-in-multi-dex-m

  • KenYeeKenYee USMember ✭✭

    The library is an Android binding wrapper I think. Android's tools really need to print out what library caused the error :-P

  • KenYeeKenYee USMember ✭✭

    Looks like you can drop the Google Play services package and then re-add the components you need?

  • KenYeeKenYee USMember ✭✭

    almost...now I get stuck at this linker error even after cleaning the solution:
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task ResolveAssemblyReference: Could not load file or assembly '/Users/kenyee/work/Myapp/Android/bin/Debug/GooglePlayServicesLib.dll' or one of its dependencies. The system cannot find the file specified.

  • bradmbradm AUMember ✭✭✭

    The solution from @digitalml worked for me. Cheers!

  • Clinton_RocksmithClinton_Rocksmith AUInsider, University ✭✭

    Hi there,

    I had the same issue and also found that the project file for Android had references for Google Play services with a hint path.

    I had removed the packages and also had to manually delete these xml lines then clean and build the solution for it to work.

    Hope this helps.

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭

    I tried with the least amount of nugget packages. But ended up installing all Google Play Services for it to work.

    And followed the directions here
    https://forums.xamarin.com/discussion/comment/104443/#Comment_104443

  • FernandoRochaFernandoRocha USUniversity ✭✭

    @TomStandaert.0575 said:
    And so every time I see a xamarin update or nuget packages update from xamarin I cross my fingers and pray, most of the time it breaks something :(

    I hate how this is still true in 2017. This is the main reason why it bothers me so much that I have to work with this tool. I spend more time fixing issues like this than coding.

Sign In or Register to comment.