Bug? Google Play Services resources not found

warwound

Expert
Licensed User
Longtime User
Looks like we have a problem with the GoogleMaps library...

At some point since the b4a GoogleMaps library was first created the Google Play Services library has been updated and is now an android 'library-project' and in order to use the GoogleMaps part of Google Play Services you are required to add a folder full of resources to your project.
Google Play Services assumes we're all developing using Eclipse, you add Google Play Services to your android Eclipse project as an 'library-project' and the folder of resources should automatically be added to your android project.

I was wondering why i couldn't see a 'My Location' button on a GoogleMap earlier, i'd enabled it with the code:

B4X:
GoogleMap1.GetUiSettings.MyLocationButtonEnabled=True

The unfiltered log shows:

** Activity (main) Create, isFirst = true **
VFY: unable to resolve static field 595 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0041
VFY: unable to resolve static field 595 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x004e
VFY: unable to resolve static field 590 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0059
VFY: unable to resolve static field 586 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0064
VFY: unable to resolve static field 600 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x006f
VFY: unable to resolve static field 597 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0081
VFY: unable to resolve static field 594 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0093
VFY: unable to resolve static field 595 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x00a5
VFY: unable to resolve static field 595 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x00b7
VFY: unable to resolve static field 592 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x00c9
VFY: unable to resolve static field 595 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x00dc
VFY: unable to resolve static field 587 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x000f
VFY: unable to resolve static field 584 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0016
VFY: unable to resolve static field 598 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x001d
VFY: unable to resolve static field 595 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0009
VFY: unable to resolve static field 589 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x001a
VFY: unable to resolve static field 588 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x003a
VFY: unable to resolve static field 585 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0041
VFY: unable to resolve static field 599 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0048
VFY: unable to resolve static field 596 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0068
VFY: unable to resolve static field 593 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x006f
VFY: unable to resolve static field 591 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0076
VFY: unable to resolve static field 595 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x000e
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
Permission denied: checkComponentPermission() owningUid=10067
Permission denied: checkComponentPermission() owningUid=10067
** Activity (main) Resume **
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
Displayed uk.co.martinpearman.b4a.googlemapdemo/.main: +1s69ms
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
GC_EXPLICIT freed 231K, 55% free 3462K/7600K, paused 3ms+4ms, total 63ms
Successfully inserted location

I tried compiling without enabling the MyLocationButton and the log showed the same errors.
I've tried this now on 3 different devices: Galaxy S3(4.1.2), Galaxy Tab2(4.2.2) and an old HTC Desire S running a custom Jelly Bean ROM.

A Google search shows it's a common issue: https://www.google.co.uk/search?q=google+play+services+resource+not+found&ie=UTF-8&oe=UTF-8

Adding the resource folder from the android sdk to my project's res folder didn't solve anything.
(The resource folder location will be found at: \some_path_here\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res)

The com.google.android.gms.R class is not being compiled with valid references to the required resources.

I've created b4a libraries from various android 'library-projects' in the past and worked around this problem by recreating the R class.
In the VitamioBundle library for example i created a class:

B4X:
package com.yixia.vitamio.library;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Hide;

@Hide
public final class R {
   @Hide
  public static final class drawable {
  public static int btn_check_holo_dark=BA.applicationContext.getResources().getIdentifier("btn_check_holo_dark", "drawable", BA.packageName);
  public static int btn_check_off_disabled_focused_holo_dark=BA.applicationContext.getResources().getIdentifier("btn_check_off_disabled_focused_holo_dark", "drawable", BA.packageName);
  public static int btn_check_off_disabled_holo_dark=BA.applicationContext.getResources().getIdentifier("btn_check_off_disabled_holo_dark", "drawable", BA.packageName);
  public static int btn_check_off_focused_holo_dark=BA.applicationContext.getResources().getIdentifier("btn_check_off_focused_holo_dark", "drawable", BA.packageName);
   }
}

The VitamioBundle library-project source code is available - it's not a compiled .jar file - so getting VitamioBundle to use my class was no problem.

BUT Google Play Services is available as a compiled .jar only and i very much doubt we'd be able to reverse engineer it so that it uses a different R class to reference resources.

Has anyone updated their Google Play Services and found the MyLocationButton can no longer be enabled?
Is the MyLocationButton not being visible related to these missing resources?
I can see the zoom in and zoom out buttons and also the compass, why not the MyLocationButton?

Any ideas?

Martin.
 

warwound

Expert
Licensed User
Longtime User
Hi Erel.

Is there any progress to report on this compilation update?

I'm starting a new project that wraps an android library project and am looking at creating a dummy R class, if an update to the b4a compilation is imminent (maybe in the new version 3?) then i'll wait for that update.

Thanks.

Martin.
 

warwound

Expert
Licensed User
Longtime User
Looks like the very latest version of Google Play Service breaks the B4A GoogleMaps library!

Nothing is mentioned in the changelog: https://developers.google.com/maps/documentation/android/releases

But after updating, my app now immediately crashes with this exception:

** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 292)
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at anywheresoftware.b4a.objects.MapFragmentWrapper.IsGooglePlayServicesAvailable(MapFragmentWrapper.java:101)
at uk.co.martinpearman.b4a.googlemapdemo.main._activity_create(main.java:292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at uk.co.martinpearman.b4a.googlemapdemo.main.afterFirstLayout(main.java:98)
at uk.co.martinpearman.b4a.googlemapdemo.main.access$100(main.java:16)
at uk.co.martinpearman.b4a.googlemapdemo.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5233)
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:799)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

A Google search reveals that the latest version of Google Play Services requires at least one addition to the manifest file.

I updated my manifest, adding:

B4X:
AddApplicationText(<meta-data
   android:name="com.google.android.gms.version"
   android:value="@integer/google_play_services_version" />)

And copied android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/version.xml to my project Objects/res/values/version.xml.
My app no longer crashes but MapFragment1.IsGooglePlayServicesAvailable returns False and my app does nothing.

This is related to Google making the Google Play Services into an 'android library project' - an android library project generally contains various resources and assets and when compiled in an environment such as Eclipse the resources and assets of the android library project are 'properly' compiled into the android application.

Looking at the log when MapFragment1.IsGooglePlayServicesAvailable returns False i see many references to missing R class entries for the Google Play Services library.
Copying all of the resources from android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res to my project Objects/res does not work as these resources are now referenced in my project's packagename R class and not in com.google.android.gms.R class (i think that's correct).

Google Play Services can no longer be treated as a standalone .jar file library, it's an android library project and the compiler must treat it as such.

Martin.
 

warwound

Expert
Licensed User
Longtime User
I'm making some progress.

First the official documentation states that we must now add at least four permissions to the manifest.
Have a read here: https://developers.google.com/maps/.../start#getting_the_google_maps_android_api_v2, scroll down to Specifying permissions.

I added these lines to my manifest:

B4X:
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(com.google.android.providers.gsf.permission.READ_GSERVICES)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)

My app immediately crashes with the exception:

** Activity (main) Create, isFirst = true **
main_activity_create (java line: 292)
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at anywheresoftware.b4a.objects.MapFragmentWrapper.IsGooglePlayServicesAvailable(MapFragmentWrapper.java:101)
at uk.co.martinpearman.b4a.googlemapdemo.main._activity_create(main.java:292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at uk.co.martinpearman.b4a.googlemapdemo.main.afterFirstLayout(main.java:98)
at uk.co.martinpearman.b4a.googlemapdemo.main.access$100(main.java:16)
at uk.co.martinpearman.b4a.googlemapdemo.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **

The documentation makes no reference to the solution, i found the solution on StackOverflow.
I now added this line to my manifest:

B4X:
AddApplicationText(<meta-data
   android:name="com.google.android.gms.version"
   android:value="@integer/google_play_services_version" />)

Note that i had already copied all of the resources from android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res to my project's Objects/res, and now in res/values/version.xml the integer resource google_play_services_version is defined.

Now my app runs perfectly!

As an experiment i removed all of the Google Play Services resource files except res/values/version.xml and again my app runs perfectly.
That's odd as i tried this earlier and my code MapFragment1.IsGooglePlayServicesAvailable returned False - Google Play Services NOT available.

Finally i realised, my earlier tests had been on an old HTC Desire S running a custom ROM 'PAC-Man android 4.2.2'.
After i switched to my S3 running the official android 4.1.2 ROM everything works.
A further test on my Galaxy Tab running official android 4.2.2 ROM also works perfectly.

I guess the custom ROM lacks official support for the latest version of Google Play Services?

The original subject of this thread remains though, my Tab2 logs many lines like:

** Activity (main) Create, isFirst = true **
VFY: unable to resolve static field 663 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0041
VFY: unable to resolve static field 663 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x004e
VFY: unable to resolve static field 658 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0059
VFY: unable to resolve static field 654 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x0064
VFY: unable to resolve static field 669 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
VFY: replacing opcode 0x60 at 0x006f
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

And even though i enabled the MyLocation button i see no button - the button must be a missing resource.
The button is missing even if copy all the resources from the SDK folder to my project's res folder.

Anyway, my manifest now contains these lines:

B4X:
AddApplicationText(<meta-data
   android:name="com.google.android.gms.version"
   android:value="@integer/google_play_services_version" />)
  
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(com.google.android.providers.gsf.permission.READ_GSERVICES)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)

And my project's Objects/res/values folder contains the SDK extras/google/google_play_services/libproject/google-play-services_lib/res/values/version.xml file and everything works - including the new version of GoogleMapsExtras which i shall upload shortly.

Martin.
 

warwound

Expert
Licensed User
Longtime User
At last i have a solution.

I compiled a simple b4a project that used the b4a GoogleMaps library and copied all of the Google Play Service library resources to the project's Object/res folder.

Using dex2jar and JD-GUI i exported the compiled R class from my package name and removed the reference to the drawable icon - this was the only reference in the R class that didn't originate from the Google Play Service library resources.

Changed the package name to com.google.android.gms and updated all compiled references:

B4X:
package com.google.android.gms;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Hide;

@Hide
public final class R {

   @Hide
   public static final class attr {
     public static final int adSize = BA.applicationContext.getResources().getIdentifier("adSize", "attr", BA.packageName);
     public static final int adUnitId = BA.applicationContext.getResources().getIdentifier("adUnitId", "attr", BA.packageName);
     public static final int cameraBearing = BA.applicationContext.getResources().getIdentifier("cameraBearing", "attr", BA.packageName);
     public static final int cameraTargetLat = BA.applicationContext.getResources().getIdentifier("cameraTargetLat", "attr", BA.packageName);
     public static final int cameraTargetLng = BA.applicationContext.getResources().getIdentifier("cameraTargetLng", "attr", BA.packageName);
     public static final int cameraTilt = BA.applicationContext.getResources().getIdentifier("cameraTilt", "attr", BA.packageName);
     public static final int cameraZoom = BA.applicationContext.getResources().getIdentifier("cameraZoom", "attr", BA.packageName);
     public static final int mapType = BA.applicationContext.getResources().getIdentifier("mapType", "attr", BA.packageName);
     public static final int uiCompass = BA.applicationContext.getResources().getIdentifier("uiCompass", "attr", BA.packageName);
     public static final int uiRotateGestures = BA.applicationContext.getResources().getIdentifier("uiRotateGestures", "attr", BA.packageName);
     public static final int uiScrollGestures = BA.applicationContext.getResources().getIdentifier("uiScrollGestures", "attr", BA.packageName);
     public static final int uiTiltGestures = BA.applicationContext.getResources().getIdentifier("uiTiltGestures", "attr", BA.packageName);
     public static final int uiZoomControls = BA.applicationContext.getResources().getIdentifier("uiZoomControls", "attr", BA.packageName);
     public static final int uiZoomGestures = BA.applicationContext.getResources().getIdentifier("uiZoomGestures", "attr", BA.packageName);
     public static final int useViewLifecycle = BA.applicationContext.getResources().getIdentifier("useViewLifecycle", "attr", BA.packageName);
     public static final int zOrderOnTop = BA.applicationContext.getResources().getIdentifier("zOrderOnTop", "attr", BA.packageName);
   }

   @Hide
   public static final class color {
     public static final int common_action_bar_splitter = BA.applicationContext.getResources().getIdentifier("common_action_bar_splitter", "color", BA.packageName);
     public static final int common_signin_btn_dark_text_default = BA.applicationContext.getResources().getIdentifier("common_signin_btn_dark_text_default", "color", BA.packageName);
     public static final int common_signin_btn_dark_text_disabled = BA.applicationContext.getResources().getIdentifier("common_signin_btn_dark_text_disabled", "color", BA.packageName);
     public static final int common_signin_btn_dark_text_focused = BA.applicationContext.getResources().getIdentifier("common_signin_btn_dark_text_focused", "color", BA.packageName);
     public static final int common_signin_btn_dark_text_pressed = BA.applicationContext.getResources().getIdentifier("common_signin_btn_dark_text_pressed", "color", BA.packageName);
     public static final int common_signin_btn_default_background = BA.applicationContext.getResources().getIdentifier("common_signin_btn_default_background", "color", BA.packageName);
     public static final int common_signin_btn_light_text_default = BA.applicationContext.getResources().getIdentifier("common_signin_btn_light_text_default", "color", BA.packageName);
     public static final int common_signin_btn_light_text_disabled = BA.applicationContext.getResources().getIdentifier("common_signin_btn_light_text_disabled", "color", BA.packageName);
     public static final int common_signin_btn_light_text_focused = BA.applicationContext.getResources().getIdentifier("common_signin_btn_light_text_focused", "color", BA.packageName);
     public static final int common_signin_btn_light_text_pressed = BA.applicationContext.getResources().getIdentifier("common_signin_btn_light_text_pressed", "color", BA.packageName);
     public static final int common_signin_btn_text_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_dark", "color", BA.packageName);
     public static final int common_signin_btn_text_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_light", "color", BA.packageName);
   }

   @Hide
   public static final class drawable {
     public static final int common_signin_btn_icon_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_disabled_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_disabled_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_disabled_focus_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_disabled_focus_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_disabled_focus_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_disabled_focus_light", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_disabled_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_disabled_light", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_focus_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_focus_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_focus_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_focus_light", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_light", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_normal_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_normal_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_normal_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_normal_light", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_pressed_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_pressed_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_icon_pressed_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_icon_pressed_light", "drawable", BA.packageName);
     public static final int common_signin_btn_text_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_text_disabled_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_disabled_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_text_disabled_focus_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_disabled_focus_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_text_disabled_focus_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_disabled_focus_light", "drawable", BA.packageName);
     public static final int common_signin_btn_text_disabled_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_disabled_light", "drawable", BA.packageName);
     public static final int common_signin_btn_text_focus_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_focus_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_text_focus_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_focus_light", "drawable", BA.packageName);
     public static final int common_signin_btn_text_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_light", "drawable", BA.packageName);
     public static final int common_signin_btn_text_normal_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_normal_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_text_normal_light = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_normal_light", "drawable", BA.packageName);
     public static final int common_signin_btn_text_pressed_dark = BA.applicationContext.getResources().getIdentifier("common_signin_btn_text_pressed_dark", "drawable", BA.packageName);
     public static final int common_signin_btn_text_pressed_light = BA.applicationContext.getResources().getIdentifier("", "drawable", BA.packageName);
     public static final int ic_plusone_medium_off_client = BA.applicationContext.getResources().getIdentifier("ic_plusone_medium_off_client", "drawable", BA.packageName);
     public static final int ic_plusone_small_off_client = BA.applicationContext.getResources().getIdentifier("ic_plusone_small_off_client", "drawable", BA.packageName);
     public static final int ic_plusone_standard_off_client = BA.applicationContext.getResources().getIdentifier("ic_plusone_standard_off_client", "drawable", BA.packageName);
     public static final int ic_plusone_tall_off_client = BA.applicationContext.getResources().getIdentifier("ic_plusone_tall_off_client", "drawable", BA.packageName);
   }

   @Hide
   public static final class id {
     public static final int hybrid = BA.applicationContext.getResources().getIdentifier("hybrid", "id", BA.packageName);
     public static final int none = BA.applicationContext.getResources().getIdentifier("none", "id", BA.packageName);
     public static final int normal = BA.applicationContext.getResources().getIdentifier("normal", "id", BA.packageName);
     public static final int satellite = BA.applicationContext.getResources().getIdentifier("satellite", "id", BA.packageName);
     public static final int terrain = BA.applicationContext.getResources().getIdentifier("terrain", "id", BA.packageName);
   }

   @Hide
   public static final class integer {
     public static final int google_play_services_version = BA.applicationContext.getResources().getIdentifier("google_play_services_version", "integer", BA.packageName);
   }

   @Hide
   public static final class string {
     public static final int auth_client_needs_enabling_title = BA.applicationContext.getResources().getIdentifier("auth_client_needs_enabling_title", "string", BA.packageName);
     public static final int auth_client_needs_installation_title = BA.applicationContext.getResources().getIdentifier("auth_client_needs_installation_title", "string", BA.packageName);
     public static final int auth_client_needs_update_title = BA.applicationContext.getResources().getIdentifier("auth_client_needs_update_title", "string", BA.packageName);
     public static final int auth_client_play_services_err_notification_msg = BA.applicationContext.getResources().getIdentifier("auth_client_play_services_err_notification_msg", "string", BA.packageName);
     public static final int auth_client_requested_by_msg = BA.applicationContext.getResources().getIdentifier("auth_client_requested_by_msg", "string", BA.packageName);
     public static final int auth_client_using_bad_version_title = BA.applicationContext.getResources().getIdentifier("auth_client_using_bad_version_title", "string", BA.packageName);
     public static final int common_google_play_services_enable_button = BA.applicationContext.getResources().getIdentifier("common_google_play_services_enable_button", "string", BA.packageName);
     public static final int common_google_play_services_enable_text = BA.applicationContext.getResources().getIdentifier("common_google_play_services_enable_text", "string", BA.packageName);
     public static final int common_google_play_services_enable_title = BA.applicationContext.getResources().getIdentifier("common_google_play_services_enable_title", "string", BA.packageName);
     public static final int common_google_play_services_install_button = BA.applicationContext.getResources().getIdentifier("common_google_play_services_install_button", "string", BA.packageName);
     public static final int common_google_play_services_install_text_phone = BA.applicationContext.getResources().getIdentifier("common_google_play_services_install_text_phone", "string", BA.packageName);
     public static final int common_google_play_services_install_text_tablet = BA.applicationContext.getResources().getIdentifier("common_google_play_services_install_text_tablet", "string", BA.packageName);
     public static final int common_google_play_services_install_title = BA.applicationContext.getResources().getIdentifier("common_google_play_services_install_title", "string", BA.packageName);
     public static final int common_google_play_services_invalid_account_text = BA.applicationContext.getResources().getIdentifier("common_google_play_services_invalid_account_text", "string", BA.packageName);
     public static final int common_google_play_services_invalid_account_title = BA.applicationContext.getResources().getIdentifier("common_google_play_services_invalid_account_title", "string", BA.packageName);
     public static final int common_google_play_services_network_error_text = BA.applicationContext.getResources().getIdentifier("common_google_play_services_network_error_text", "string", BA.packageName);
     public static final int common_google_play_services_network_error_title = BA.applicationContext.getResources().getIdentifier("common_google_play_services_network_error_title", "string", BA.packageName);
     public static final int common_google_play_services_unknown_issue = BA.applicationContext.getResources().getIdentifier("common_google_play_services_unknown_issue", "string", BA.packageName);
     public static final int common_google_play_services_unsupported_date_text = BA.applicationContext.getResources().getIdentifier("common_google_play_services_unsupported_date_text", "string", BA.packageName);
     public static final int common_google_play_services_unsupported_text = BA.applicationContext.getResources().getIdentifier("common_google_play_services_unsupported_text", "string", BA.packageName);
     public static final int common_google_play_services_unsupported_title = BA.applicationContext.getResources().getIdentifier("common_google_play_services_unsupported_title", "string", BA.packageName);
     public static final int common_google_play_services_update_button = BA.applicationContext.getResources().getIdentifier("common_google_play_services_update_button", "string", BA.packageName);
     public static final int common_google_play_services_update_text = BA.applicationContext.getResources().getIdentifier("common_google_play_services_update_text", "string", BA.packageName);
     public static final int common_google_play_services_update_title = BA.applicationContext.getResources().getIdentifier("common_google_play_services_update_title", "string", BA.packageName);
     public static final int common_signin_button_text = BA.applicationContext.getResources().getIdentifier("common_signin_button_text", "string", BA.packageName);
     public static final int common_signin_button_text_long = BA.applicationContext.getResources().getIdentifier("common_signin_button_text_long", "string", BA.packageName);
   }

   @Hide
   public static final class styleable {
     public static final int[] AdsAttrs = { R.attr.adSize, R.attr.adUnitId };
     public static final int AdsAttrs_adSize = BA.applicationContext.getResources().getIdentifier("AdsAttrs_adSize", "styleable", BA.packageName);
     public static final int AdsAttrs_adUnitId = BA.applicationContext.getResources().getIdentifier("AdsAttrs_adUnitId", "styleable", BA.packageName);
     public static final int[] MapAttrs = { R.attr.mapType, R.attr.cameraBearing,
         R.attr.cameraTargetLat, R.attr.cameraTargetLng, R.attr.cameraTilt, R.attr.cameraZoom, R.attr.uiCompass,
         R.attr.uiRotateGestures, R.attr.uiScrollGestures, R.attr.uiTiltGestures, R.attr.uiZoomControls, R.attr.uiZoomGestures,
         R.attr.useViewLifecycle, R.attr.zOrderOnTop };
     public static final int MapAttrs_cameraBearing = BA.applicationContext.getResources().getIdentifier("MapAttrs_cameraBearing", "styleable", BA.packageName);
     public static final int MapAttrs_cameraTargetLat = BA.applicationContext.getResources().getIdentifier("MapAttrs_cameraTargetLat", "styleable", BA.packageName);
     public static final int MapAttrs_cameraTargetLng = BA.applicationContext.getResources().getIdentifier("MapAttrs_cameraTargetLng", "styleable", BA.packageName);
     public static final int MapAttrs_cameraTilt = BA.applicationContext.getResources().getIdentifier("MapAttrs_cameraTilt", "styleable", BA.packageName);
     public static final int MapAttrs_cameraZoom = BA.applicationContext.getResources().getIdentifier("MapAttrs_cameraZoom", "styleable", BA.packageName);
     public static final int MapAttrs_mapType = BA.applicationContext.getResources().getIdentifier("MapAttrs_mapType", "styleable", BA.packageName);
     public static final int MapAttrs_uiCompass = BA.applicationContext.getResources().getIdentifier("MapAttrs_uiCompass", "styleable", BA.packageName);
     public static final int MapAttrs_uiRotateGestures = BA.applicationContext.getResources().getIdentifier("MapAttrs_uiRotateGestures", "styleable", BA.packageName);
     public static final int MapAttrs_uiScrollGestures = BA.applicationContext.getResources().getIdentifier("MapAttrs_uiScrollGestures", "styleable", BA.packageName);
     public static final int MapAttrs_uiTiltGestures = BA.applicationContext.getResources().getIdentifier("MapAttrs_uiTiltGestures", "styleable", BA.packageName);
     public static final int MapAttrs_uiZoomControls = BA.applicationContext.getResources().getIdentifier("MapAttrs_uiZoomControls", "styleable", BA.packageName);
     public static final int MapAttrs_uiZoomGestures = BA.applicationContext.getResources().getIdentifier("MapAttrs_uiZoomGestures", "styleable", BA.packageName);
     public static final int MapAttrs_useViewLifecycle = BA.applicationContext.getResources().getIdentifier("MapAttrs_useViewLifecycle", "styleable", BA.packageName);
     public static final int MapAttrs_zOrderOnTop = BA.applicationContext.getResources().getIdentifier("MapAttrs_zOrderOnTop", "styleable", BA.packageName);
   }
}

Added the new com.google.android.gms.R class to GoogleMapsExtras and re-compiled my b4a project.
Now there are no errors logged about missing resources.

My problem with the MyLocation button not being visible was a mistake on my part - i'd not enabled the MyLocation layer and without that being enabled the button doesn't appear.

So i'll upload an updated GoogleMapsExtras shortly that contains the new R class and add some notes to document the use of the resources and the new google_play_services_version integer resource that's required with the latest version of Google Play Services.

This 'bug' can be considered fixed i think.

Martin.
 

scrat

Active Member
Licensed User
Longtime User
thank you Martin
I encounter the same problem with the new Google-play library.
It is good news that you have solved this problem.
 
Top