[TIMOB-16510] Android: The Google Play services resources were not found
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-05-08T21:47:06.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | 2014 Sprint 09, 2014 Sprint 09 SDK, Release 3.4.1, Release 3.4.2, Release 3.5.0, Release 4.0.0 |
Components | Android |
Labels | android, map, mobile, module, module_androidmapv2, qe-manualtest, qe-testadded, ti.map, titanium, triage |
Reporter | Vatthanachai Wongprasert |
Assignee | Hieu Pham |
Created | 2014-02-01T11:47:08.000+0000 |
Updated | 2014-11-21T18:49:29.000+0000 |
Description
When I use module 'ti.map' and deploy application on android device. I get error from console :
-- Start application log -----------------------------------------------------
[ERROR] : SELinux: Function: selinux_android_load_priority [0], There is no sepolicy file [INFO] : TiApplication: (main) [0,0] checkpoint, app created.
[INFO] : TiApplication: (main) [48,48] Titanium 3.2.0 (2013/12/20 10:57 d9182d6)
[ERROR] : SELinux:
[ERROR] : SELinux: Function: selinux_android_load_priority [1], There is no sepolicy version file
[ERROR] : SELinux:
[ERROR] : SELinux: Function: selinux_android_load_priority , loading version is VE=SEPF_GT-N7100_4.3_0016
[ERROR] : SELinux:
[ERROR] : SELinux:
[ERROR] : SELinux: selinux_android_seapp_context_reload: seapp_contexts file is loaded from /seapp_contexts
[INFO] : TiDbHelper: (main) [83,131] No value in database for platform key: 'unique_machine_id' returning supplied default ''
[INFO] : TiDbHelper: (main) [4,135] No value in database for platform key: 'hardware_machine_id' returning supplied default ''
[INFO] : TiApplication: (main) [121,256] Titanium Javascript runtime: v8
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
[INFO] : TiAnalyticsDb: (main) [38,38] Upgrading Database from 1 to 4
[WARN] : V8Object: Runtime disposed, cannot set property 'userAgent'
[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 14.016MB for 1536016-byte allocation
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.ai.whereami2.WhereAmIIiActivity@42824f28
[ERROR] : ViewSystem: ViewRootImpl #2 Surface is not valid.
[WARN] : dalvikvm: VFY: unable to resolve static field 944 (MapAttrs) in Lcom/google/android/gms/R$styleable;
[ERROR] : MoreInfoHPW_ViewGroup: Parent view is not a TextView
[WARN] : dalvikvm: VFY: unable to resolve static field 936 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 936 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 931 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 927 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 941 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 938 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 935 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 936 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 936 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 933 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 936 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 928 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 925 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 939 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 936 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 930 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 929 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 926 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 940 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 937 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 934 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 932 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 936 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41c70700)
[ERROR] : TiApplication: (main) [592,592] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ai.whereami2/org.appcelerator.titanium.TiActivity}: java.lang.RuntimeException: API key not found. Check that <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml; Titanium 3.2.0,2013/12/20 10:57,d9182d6
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ai.whereami2/org.appcelerator.titanium.TiActivity}: java.lang.RuntimeException: API key not found. Check that <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2362)
[ERROR] : TiApplication: at android.app.ActivityThread.access$700(ActivityThread.java:168)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1329)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5493)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:525)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1209)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[ERROR] : TiApplication: Caused by: java.lang.RuntimeException: API key not found. Check that <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml
[ERROR] : TiApplication: at maps.af.ay.a(Unknown Source)
[ERROR] : TiApplication: at maps.af.ay.a(Unknown Source)
[ERROR] : TiApplication: at maps.af.ay.a(Unknown Source)
[ERROR] : TiApplication: at maps.af.ay.a(Unknown Source)
[ERROR] : TiApplication: at maps.af.al.a(Unknown Source)
[ERROR] : TiApplication: at maps.af.bg.a(Unknown Source)
[ERROR] : TiApplication: at maps.af.bf.a(Unknown Source)
[ERROR] : TiApplication: at ebt.onTransact(SourceFile:107)
[ERROR] : TiApplication: at android.os.Binder.transact(Binder.java:347)
[ERROR] : TiApplication: at com.google.android.gms.maps.internal.IMapFragmentDelegate$a$a.onCreateView(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.maps.SupportMapFragment$a.onCreateView(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.dynamic.a$4.b(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.dynamic.a.a(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.dynamic.a.onCreateView(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:871)
[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1083)
[ERROR] : TiApplication: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:635)
[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1431)
[ERROR] : TiApplication: at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:523)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onStart(TiBaseActivity.java:1048)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1188)
[ERROR] : TiApplication: at android.app.Activity.performStart(Activity.java:5382)
[ERROR] : TiApplication: ... 11 more
[WARN] : TiVerify: (Timer-0) [4421,5013] Verifying module licenses...
[INFO] : TiVerify: (Timer-0) [3877,8890] Succesfully verified module licenses
[INFO] : Process: Sending signal. PID: 11216 SIG: 9
and this is my code to create mapview :
var MapModule = require('ti.map');
exports.ApplicationWindow = function() {
var self = Titanium.UI.createWindow({
exitOnClose : true,
modal : true,
backgroundColor : 'white'
});
var vContent = Titanium.UI.createView({});
var vInfo = Titanium.UI.createView({});
var vMap = Titanium.UI.createView({});
var map = MapModule.createView({
mapType : MapModule.NORMAL_TYPE
});
vMap.add(map);
vContent.add(vInfo);
vContent.add(vMap);
self.add(vContent);
return self;
};
but on iphone emulator it can run success.
How to fix it? Thanks.
Attachments
File | Date | Size |
---|---|---|
19-2-2014 9-30-02.png | 2014-02-19T02:30:54.000+0000 | 12093 |
2014-02-03_20-15-26.png | 2014-02-03T13:22:29.000+0000 | 131580 |
2014-02-13_08-22-21.png | 2014-02-13T01:23:16.000+0000 | 27277 |
Screenshot_2014-02-03-21-05-53.png | 2014-02-03T14:11:31.000+0000 | 150793 |
Screenshot_2014-02-03-21-14-45.png | 2014-02-03T14:16:21.000+0000 | 239403 |
Screenshot_2014-02-10-11-40-02.png | 2014-02-10T04:42:58.000+0000 | 139255 |
Following error in your stack trace indicates that you have not specified the API key. java.lang.RuntimeException: API key not found. Check that
Thank you, Now I can use google map on device, But I have new Error Log in Console :
This is tiapp.xml config :
I have already install Google play service in android sdk.
On device already install Google Play Services. Device : GT-N7100 Samsung Note 2, GT-N8000 Samsung Note 10.1
I have the same error, and I have followed the guide for the correct meta tags etc. On IOS it works, but on Android I always get the error, in the simulator and on my real android device with android 4.1.2 Here is my android manifest:
It appears to be a pretty common problem with native Android applications as discussed on multiple internet forums. For example, take a look at this thread: http://stackoverflow.com/questions/18068627/logcat-message-the-google-play-services-resources-were-not-found-check-your-pr It appears that if the current location is null (cannot be determined from all sources) then you will get this error. Can you please make sure that Location Services => Google Location Services is checked?
Yes, I have already check Location and Google Search.
I have the same issue and I got 3 minus in [Q&A](http://developer.appcelerator.com/question/162475/google-mapsv2-make-trouble-on-android-since-230ga) for my question. My way: 1. Creating of keystore 2. Extracting the SHA1-key and transfer this key + ';' + appid into google console. 3. Copy of the API - ke from console into tiapp.xml (application section of manifest) 4. enabling of v2-service on google console. 5. Enabling of google play service in SDK manager 6. testing Ti.Geolocation.Android.createLocationRule (successful) ==> "GooglePlayServicesUtil: The Google Play services resources were not found. Check your project ..." Any ideas/workarounds? It is my third map project and in other project it runs. (But I have no recompile) Rainer
Yes, I have already enabled it.
I am having the same trouble as everyone else getting the google maps to work. I have also ensured google play services are available. [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [INFO] : Google Play services is installed. (from test)
Now Map Not work and have this Error when deploy to device. [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [ERROR] : NappDrawer: (main) [409,409] ti.modules.titanium.ui.ViewProxy@41d63cc8 [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [ERROR] : TiApplication: (main) [461,1014] Sending event: exception on thread: main msg:java.lang.IllegalArgumentException: No view found for id 0x3e8 for fragment SupportMapFragment{41f61dd8 #0 id=0x3e8}; Titanium 3.2.1,2014/02/06 17:03,991027b [ERROR] : TiApplication: java.lang.IllegalArgumentException: No view found for id 0x3e8 for fragment SupportMapFragment{41f61dd8 #0 id=0x3e8} [ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:865) [ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1083) [ERROR] : TiApplication: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:635) [ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1431) [ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:420) [ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:615) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:92) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:4921) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
This is a known issue. Similar to AppCompat, Google Play Services comes with its own resources. Right now those resources aren't included in module because of platform limitations. That error shouldn't be crashing unless they are using resources directly.
Hi, Hieu Pham. Did you have any way to fixed. (TT^TT)
Moving this ticket to engineering as I can reproduce this error with a simple test case. Please use the test case from TIMOB-16502 to reproduce this issue.
master PR: https://github.com/appcelerator-modules/ti.map/pull/43 Testing steps: 1. Run code from /example 2. Check logs, you should not see
PR merged
Note that we will not be shipping 2.1.5 with 3.3.0, but you are welcome to grab it from the repo for people encountering this issue.
[~jonalter] To the discussion from yesterday. This is currently "in" 3.4.0
This might also be fixed with a map update for 3.4.1
Verified the fix. We don't see any "Google Play services resources were not found" errors in the console. Closing. Environment: Appc Studio : 3.4.1.201410191611 Ti SDK : 3.4.1.v20141024151719, 3.4.2.v20141027085717, 3.5.0.v20141027104915 Mac OSX : 10.9.4 Alloy : 1.5.1 CLI - 3.4.0 Code Processor: 1.1.1 Nexus 5 - android 5.0 preview, Galaxy S4 - android 4.4.2 Map Module: 2.2.1
This is resolved by TIMOB-17884.