MobileChromeApps / google-play-services

A Cordova plugin for Android that adds Google Play Services
51 stars 94 forks source link

App crashes due to "Google Play Services" resources missing #14

Open pkaul opened 9 years ago

pkaul commented 9 years ago

Hi,

adding the google-play-services as a plugin to my project doesn't seem to be sufficient this service to work properly on an Android (4.0.4) phone. The app crashes with after writing these messages to the log:

12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2322 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2317 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2336 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2314 (common_android_wear_update_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2333 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2327 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2324 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2331 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2321 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2320 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2316 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2335 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2313 (common_android_wear_update_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2332 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2326 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2323 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2319 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2315 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2334 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2331 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2328 (common_google_play_services_notification_needs_installation_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2329 (common_google_play_services_notification_needs_update_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2312 (common_android_wear_notification_needs_update_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2325 (common_google_play_services_needs_enabling_title) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2332 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2326 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.193: W/dalvikvm(20135): VFY: unable to resolve static field 2323 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
12-01 09:48:21.203: W/dalvikvm(20135): VFY: unable to resolve static field 2331 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
12-01 09:48:21.213: W/dalvikvm(20135): VFY: unable to resolve static field 2318 (common_google_play_services_error_notification_requested_by_msg) in Lcom/google/android/gms/R$string;

Do you have an idea what is going wrong or what I might have missed?

mwoghiren commented 9 years ago

Hi there,

Thanks for reporting. I believe you need to install/update Google Play Services on the device. This error results from a problem displaying the dialog that prompts the user to do so. You should be able to update from the Play Store.

pkaul commented 9 years ago

Hi, thanks for your answer! I will try this out. But just wondering: Shouldn't be the google-play-services plugin come with all required resources so that the mentioned error dialog is displayed properly? Or how can an app developer make sure that the end user's device is up-to-date so that no such error occurs?

mwoghiren commented 9 years ago

Yeah—the plugin is supposed to come with the dialog resources. It's a bug we're looking at. :)

Are you using this with cca or cordova? Which version?

pkaul commented 9 years ago

Ah, that's good to hear that this is a bug and you are already investigating!

Currently, I'm using cordova 4.0.0 via https://www.npmjs.org/package/grunt-cordovacli

Cheers P.

mwoghiren commented 9 years ago

Here is a similar issue, and it contains a couple of potential solutions (one short term and one long term). In short, though, the solution is to build using gradle instead of ant. Can you let us know if you find success with either solution?

pkaul commented 9 years ago

Hey, deleting [cordova_work]/platforms/android/custom_rules.xml works for me! But I can't explain to myself why this works. :)

Thank you very much for this hint!

rlepinski commented 9 years ago

Here are the relevant bugs for this issue:

Doesn't seem like it is going to be fixed anytime soon.