Hi,
I am using titanium version 3.3.0
my app is crashing at the first time and after working perfectly. it is happening only on android, ios is fine.
and showing the error on consile like the below.
[WARN] : dalvikvm: VFY: unable to resolve static field 5377 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5377 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5372 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5368 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5383 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5380 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5376 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5377 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5377 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5374 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5377 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5380 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5369 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5366 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5381 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5377 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5371 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5370 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5367 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5382 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5379 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5375 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5373 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5378 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 5377 (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.
[INFO] : ACS Request: { url: "push_notification/subscribe.json", verb: "POST", data: {"channel":"demo_alert","device_token":"APA91bH67ukt9w7BQWGJfQXmz944vIRhF05WOY9kURAKT1E7qmL1NEoRCGxk6yZQfqbLz6hV1JHaLcp7I7BhV7hxvUG4UyZcj0esnn-eYVaVYaq2DCjUHoyW-hnFdEPZLtMwxhYTeAcPsht3ZS5tJWS3npTrJ6V-_A","type":"gcm"} })
[INFO] : POST: https://api.cloud.appcelerator.com/v1/push_notification/subscribe.json?key=HOlwoBUmvIXdeRgAUu7TDKj6kbixDonL&_session_id=7F-myKqxi0ZHRjhq99n43O8yROY
[INFO] : header: {}
[INFO] : data: {"channel":"demo_alert","device_token":"APA91bH67ukt9w7BQWGJfQXmz944vIRhF05WOY9kURAKT1E7qmL1NEoRCGxk6yZQfqbLz6hV1JHaLcp7I7BhV7hxvUG4UyZcj0esnn-eYVaVYaq2DCjUHoyW-hnFdEPZLtMwxhYTeAcPsht3ZS5tJWS3npTrJ6V-_A","type":"gcm","suppress_response_codes":"true","ti_analytics":"{\"mid\":\"aff7133990ab4aa5\",\"app_version\":\"1.5.4\",\"platform\":\"android\",\"sid\":\"4b9ed293-7229-4571-8224-c93836c81c4d\"}"}
[WARN] : dalvikvm: threadid=23: thread exiting with uncaught exception (group=0x419e72a0)
[WARN] : W/System.err: java.lang.NullPointerException
[WARN] : W/System.err: at com.activate.gcm.GCMIntentService.onRegistered(GCMIntentService.java:41)
[WARN] : W/System.err: at com.google.android.gcm.GCMBaseIntentService.handleRegistration(GCMBaseIntentService.java:255)
[WARN] : W/System.err: at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:157)
[WARN] : W/System.err: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
[WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
[WARN] : W/System.err: at android.os.Looper.loop(Looper.java:137)
[WARN] : W/System.err: at android.os.HandlerThread.run(HandlerThread.java:60)
[ERROR] : TiApplication: (IntentService[GCMIntentService--1]) [40,289271] Sending event: exception on thread: IntentService[GCMIntentService--1] msg:java.lang.NullPointerException; Titanium 3.3.0,2014/07/11 12:36,787cd39
[ERROR] : TiApplication: java.lang.NullPointerException
[ERROR] : TiApplication: at com.activate.gcm.GCMIntentService.onRegistered(GCMIntentService.java:41)
[ERROR] : TiApplication: at com.google.android.gcm.GCMBaseIntentService.handleRegistration(GCMBaseIntentService.java:255)
[ERROR] : TiApplication: at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:157)
[ERROR] : TiApplication: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137)
[ERROR] : TiApplication: at android.os.HandlerThread.run(HandlerThread.java:60)
[WARN] : SQLiteConnectionPool: A SQLiteConnection object for database '+data+data+com_shopper_TrendTrunk+databases+TrendTrunk' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
[INFO] : {"success":true,"error":false,"meta":{"status":"ok","code":200,"method_name":"SubscribeNotification"}}
[INFO] : Subscribed for Push Notification!
and my code is like
function subscribe(){
Cloud.PushNotifications.subscribe({
channel: 'demo_alert',
device_token: deviceToken,
type: 'gcm'
}, function (e){
if (e.success) {
Ti.API.info('Subscribed for Push Notification!');
}else{
Ti.API.info('Error:' +((e.error && e.message) || JSON.stringify(e)));
}
});
}
please help me to solve this issue.
↧