New Google Play services stuff like low power location

Discussion in 'Android Questions' started by bluedude, May 28, 2013.

  1. Dadeda

    Dadeda Member Licensed User

    Today i've updated google play services to version 22.

    Before everything was working fine, but now it breaks the app.
    I've updated google play jar into lib folder, copy res folder and it compiles ok but when i run the app i got :

    Code:
    ** Activity (main) Create, isFirst = true **


    ** 
    Activity (main) Resume **


    Updated: (ArrayList) []


    ** 
    Service (locationtracker) Create **


    java.lang.RuntimeException: Unable 
    to create service pt.dadeda.hotelbooking.locationtracker: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient


        at android.app.ActivityThread.handleCreateService(ActivityThread.java:
    2277)
        at android.app.ActivityThread.access$
    1600(ActivityThread.java:128)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1215)
        at android.os.Handler.dispatchMessage(Handler.java:
    99)
        at android.os.Looper.loop(Looper.java:
    137)
        at android.app.ActivityThread.main(ActivityThread.java:
    4517)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    993)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    760)
        at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient


        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    148)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    159)
        at pt.dadeda.hotelbooking.locationtracker.onCreate(locationtracker.java:
    45)
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:
    2267)
        ... 
    10 more
    Caused by: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
        at uk.co.martinpearman.b4a.android.gms.location.LocationClient.Initialize(LocationClient.java:
    112)
        at pt.dadeda.hotelbooking.locationtracker._service_create(locationtracker.java:
    201)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    511)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:636)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:302)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:238)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    511)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    121)
        ... 
    13 more
    Program compiled 
    in debug mode, can only run with debugger attached.


    ** 
    Service (locationtracker) Create **


    java.lang.RuntimeException: Unable 
    to create service pt.dadeda.hotelbooking.locationtracker: java.lang.RuntimeException: java.lang.Exception: Sub service_create signature does not match expected signature.


        at android.app.ActivityThread.handleCreateService(ActivityThread.java:
    2277)
        at android.app.ActivityThread.access$
    1600(ActivityThread.java:128)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1215)
        at android.os.Handler.dispatchMessage(Handler.java:
    99)
        at android.os.Looper.loop(Looper.java:
    137)
        at android.app.ActivityThread.main(ActivityThread.java:
    4517)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    993)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    760)
        at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.RuntimeException: java.lang.Exception: 
    Sub service_create signature does not match expected signature.
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    148)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    159)
        at pt.dadeda.hotelbooking.locationtracker.onCreate(locationtracker.java:
    45)
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:
    2267)
        ... 
    10 more
    Caused by: java.lang.Exception: 
    Sub service_create signature does not match expected signature.
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    123)
        ... 
    13 more
     
  2. Dadeda

    Dadeda Member Licensed User

    Help! i can't make this work... and i can't go to rev 21 of google play services where everything was working...
     
  3. warwound

    warwound Expert Licensed User

    There's a problem with the ExternalDisplays library too and i'm sure that's related to a recent Google Play Services update.
    Unfortunately i just don't have the time to find a solution.

    Hopefully someone else can thru trial and error find a solution.
     
  4. Dadeda

    Dadeda Member Licensed User

    I have manage to revert google play services to rev 21, and all is working again, DO NOT UPDATE GOOGLE PLAY TO REV 22 or it will break your app!!
    hoppefully someone will be able to solve this!!
     
  5. Erel

    Erel Administrator Staff Member Licensed User

  6. Croïd

    Croïd Active Member Licensed User

    For information with my version 22

    Code:
    Installing file.
    ** 
    Activity (main) Pause, UserClosed = false **
    PackageAdded: package:uk.co.martinpearman.b4a.locationapidemo
    Copying updated assets files (
    1)
    ** 
    Activity (main) Create, isFirst = true **
    ** 
    Activity (main) Resume **
    ** 
    Service (locationtracker) Create **
    java.lang.RuntimeException: Unable 
    to create service uk.co.martinpearman.b4a.locationapidemo.locationtracker: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:
    2741)
        at android.app.ActivityThread.access$
    1800(ActivityThread.java:144)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1361)
        at android.os.Handler.dispatchMessage(Handler.java:
    102)
        at android.os.Looper.loop(Looper.java:
    135)
        at android.app.ActivityThread.main(ActivityThread.java:
    5221)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    899)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    694)
    Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    148)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:
    159)
        at uk.co.martinpearman.b4a.locationapidemo.locationtracker.onCreate(locationtracker.java:
    45)
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:
    2731)
        ... 
    9 more
    Caused by: java.lang.NoClassDefFoundError: uk.co.martinpearman.b4a.android.gms.location.subclasses.LocationClient
        at uk.co.martinpearman.b4a.android.gms.location.LocationClient.Initialize(LocationClient.java:
    112)
        at uk.co.martinpearman.b4a.locationapidemo.locationtracker._service_create(locationtracker.java:
    189)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    372)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:636)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:302)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:238)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    372)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:
    121)
        ... 
    12 more
    ** 
    Activity (main) Resume **
     
    Last edited: Dec 20, 2014
  7. Croïd

    Croïd Active Member Licensed User

    Warwound, all sample api_location crash on Lollipop (with play services R21 or R22) !

    do you think it comes from android 5 ?

    and thank you for all your work
     
  8. Dadeda

    Dadeda Member Licensed User

  9. coslad

    coslad Well-Known Member Licensed User

    Just a question, this library return the location only if the " Location services settings" is on? am i right? so if i use the toggle button that is next the wifi icon, the app doesn't works anymore! great work google! !!
     
  10. warwound

    warwound Expert Licensed User

    This library is no longer useable.
    The Google API that it wrapped no longer exists.


    It was replaced with the FusedLocationProvider.

    I have wrapped the FusedLocationProvider and shall upload it in the next day or two.
     
    Last edited: Feb 13, 2015
    DonManfred, brelto85, Erel and 2 others like this.
  11. warwound

    warwound Expert Licensed User

  12. coslad

    coslad Well-Known Member Licensed User

    Great!!!!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice