{"action":"created","issue":{"url":"https://api.github.com/repos/arleyandrada/PushClient/issues/90","labels_url":"https://api.github.com/repos/arleyandrada/PushClient/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/arleyandrada/PushClient/issues/90/comments","events_url":"https://api.github.com/repos/arleyandrada/PushClient/issues/90/events","html_url":"https://github.com/arleyandrada/PushClient/issues/90","id":77512663,"number":90,"title":"Push Client - Titanium Classic","user":{"login":"somefakeuser","id":12264970,"avatar_url":"https://avatars.githubusercontent.com/u/12264970?v=3","gravatar_id":"","url":"https://api.github.com/users/somefakeuser","html_url":"https://github.com/somefakeuser","followers_url":"https://api.github.com/users/somefakeuser/followers","following_url":"https://api.github.com/users/somefakeuser/following{/other_user}","gists_url":"https://api.github.com/users/somefakeuser/gists{/gist_id}","starred_url":"https://api.github.com/users/somefakeuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/somefakeuser/subscriptions","organizations_url":"https://api.github.com/users/somefakeuser/orgs","repos_url":"https://api.github.com/users/somefakeuser/repos","events_url":"https://api.github.com/users/somefakeuser/events{/privacy}","received_events_url":"https://api.github.com/users/somefakeuser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T05:46:01Z","updated_at":"2015-05-18T05:46:28Z","closed_at":null,"body":"Hi Arley I am using your module and trying to get this working use the Classic version and not Alloy. I'm really having trouble and was wondering if you could give me a step by step of how to set things up.\r\n\r\n(I have successfully set up the module and have also set up the Parse.com app for Android.)\r\n\r\nHere is my Titanium file structure for reference.\r\n\r\n/root/resources/app.js (I've put your example code in here)\r\n\r\n/root/resources/parse/ (This contains the config.json, parse.js, alloy.js)\r\n\r\nRunning the app seems to work fine at the very start but soon crashes and I assume it's because of the alloy setup.\r\n\r\nWould you please be able to show me what I should change to make this work for a Classic version?\r\n\r\nThis is the console:\r\n```\r\n[INFO] :   eventSuccess:{\"type\":\"PushClient_Success\",\"source\":{\"bubbleParent\":true,\"apiName\":\"Ti.Module\",\"invocationAPIs\":[],\"_events\":{\"PushClient_Success\":{},\"PushClient_Error\":{},\"PushClient_Callback\":{}}},\"registrationId\":\"APA91bFovsWOQcg_5XymHMMt8JBVSvqBN8bCz17oCjqeyrXPajItj-Enc3zvaxZwbbkcppYxYlKCQzlU7TCcCVTnjMTJzkJLVLCqNDe8y1TmaFFMbpoS2lzNFs4irPD5WJqYsLDShKgu262JVXWvLIBqu74atIU6QQ\",\"bubbles\":false,\"success\":true,\"code\":0,\"cancelBubble\":false}\r\n[INFO] :   ALERT: (KrollRuntimeThread) [305,305] Success:\r\n\r\n[INFO] :   ALERT:\r\n\r\n[INFO] :   ALERT: registrationId\r\n\r\n[INFO] :   ALERT:\r\n\r\n[INFO] :   ALERT: APA91bFovsWOQcg_5XymHMMt8JBVSvqBN8bCz17oCjqeyrXPajItj-Enc3zvaxZwbbkcppYxYlKCQzlU7TCcCVTnjMTJzkJLVLCqNDe8y1TmaFFMbpoS2lzNFs4irPD5WJqYsLDShKgu262JVXWvLIBqu74atIU6QQ\r\n\r\n[ERROR] :  TiApplication: (main) [7424,7729] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class \"com.parse.GcmBroadcastReceiver\" on path: DexPathList[[zip file \"/data/app/com.xxxx.xxxxx-1/base.apk\"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]; Titanium 3.5.1,2015/03/05 10:08,96875c9\r\n\r\n[ERROR] :  TiApplication: java.lang.RuntimeException: Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class \"com.parse.GcmBroadcastReceiver\" on path: DexPathList[[zip file \"/data/app/com.xxxx.xxxxx-1/base.apk\"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]\r\n\r\n[ERROR] :  TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2976)\r\n\r\n[ERROR] :  TiApplication: at android.app.ActivityThread.access$1800(ActivityThread.java:177)\r\n\r\n[ERROR] :  TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1525)\r\n\r\n[ERROR] :  TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)\r\n\r\n[ERROR] :  TiApplication: at android.os.Looper.loop(Looper.java:145)\r\n\r\n[ERROR] :  TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5944)\r\n\r\n[ERROR] :  TiApplication: at java.lang.reflect.Method.invoke(Native Method)\r\n\r\n[ERROR] :  TiApplication: at java.lang.reflect.Method.invoke(Method.java:372)\r\n\r\n[ERROR] :  TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)\r\n\r\n[ERROR] :  TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)\r\n\r\n[ERROR] :  TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class \"com.parse.GcmBroadcastReceiver\" on path: DexPathList[[zip file \"/data/app/com.xxxx.xxxxx-1/base.apk\"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]\r\n\r\n[ERROR] :  TiApplication: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)\r\n\r\n[ERROR] :  TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)\r\n\r\n[ERROR] :  TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)\r\n\r\n[ERROR] :  TiApplication: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2971)\r\n\r\n[ERROR] :  TiApplication: ... 9 more\r\n\r\n[ERROR] :  TiApplication: Suppressed: java.lang.ClassNotFoundException: com.parse.GcmBroadcastReceiver\r\n\r\n[ERROR] :  TiApplication: at java.lang.Class.classForName(Native Method)\r\n\r\n[ERROR] :  TiApplication: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)\r\n\r\n[ERROR] :  TiApplication: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)\r\n\r\n[ERROR] :  TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)\r\n\r\n[ERROR] :  TiApplication: ... 11 more\r\n\r\n[ERROR] :  TiApplication: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available\r\n\r\n[ERROR] :  AndroidRuntime: FATAL EXCEPTION: main\r\n\r\n[ERROR] :  AndroidRuntime: Process: com.xxxx.xxxxx, PID: 22899\r\n\r\n[ERROR] :  AndroidRuntime: java.lang.RuntimeException: Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class \"com.parse.GcmBroadcastReceiver\" on path: DexPathList[[zip file \"/data/app/com.xxxx.xxxxx-1/base.apk\"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]\r\n\r\n[ERROR] :  AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2976)\r\n\r\n[ERROR] :  AndroidRuntime: at android.app.ActivityThread.access$1800(ActivityThread.java:177)\r\n\r\n[ERROR] :  AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1525)\r\n\r\n[ERROR] :  AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)\r\n\r\n[ERROR] :  AndroidRuntime: at android.os.Looper.loop(Looper.java:145)\r\n\r\n[ERROR] :  AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5944)\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)\r\n\r\n[ERROR] :  AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)\r\n\r\n[ERROR] :  AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)\r\n\r\n[ERROR] :  AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class \"com.parse.GcmBroadcastReceiver\" on path: DexPathList[[zip file \"/data/app/com.xxxx.xxxxx-1/base.apk\"],nativeLibraryDirectories=[/data/app/com.xxxx.xxxxx-1/lib/arm, /vendor/lib, /system/lib]]\r\n\r\n[ERROR] :  AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)\r\n\r\n[ERROR] :  AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2971)\r\n\r\n[ERROR] :  AndroidRuntime: ... 9 more\r\n\r\n[ERROR] :  AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.parse.GcmBroadcastReceiver\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.Class.classForName(Native Method)\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)\r\n\r\n[ERROR] :  AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)\r\n\r\n[ERROR] :  AndroidRuntime: ... 11 more\r\n\r\n[ERROR] :  AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available\r\n```"},"comment":{"url":"https://api.github.com/repos/arleyandrada/PushClient/issues/comments/102928074","html_url":"https://github.com/arleyandrada/PushClient/issues/90#issuecomment-102928074","issue_url":"https://api.github.com/repos/arleyandrada/PushClient/issues/90","id":102928074,"user":{"login":"arleyandrada","id":1809866,"avatar_url":"https://avatars.githubusercontent.com/u/1809866?v=3","gravatar_id":"","url":"https://api.github.com/users/arleyandrada","html_url":"https://github.com/arleyandrada","followers_url":"https://api.github.com/users/arleyandrada/followers","following_url":"https://api.github.com/users/arleyandrada/following{/other_user}","gists_url":"https://api.github.com/users/arleyandrada/gists{/gist_id}","starred_url":"https://api.github.com/users/arleyandrada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arleyandrada/subscriptions","organizations_url":"https://api.github.com/users/arleyandrada/orgs","repos_url":"https://api.github.com/users/arleyandrada/repos","events_url":"https://api.github.com/users/arleyandrada/events{/privacy}","received_events_url":"https://api.github.com/users/arleyandrada/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T05:46:28Z","updated_at":"2015-05-18T05:46:28Z","body":"My module is not dependent of Alloy. You can make some few changes to my sample code to get it to work in classic Titanium projects:\r\n- Move and rename the sample code files to classic Titanium folders;\r\n- Review and change the require directive to fix the file paths;\r\n- Define the OS_ANDROID variable (in alloy.js file) with any classic Titanium library variable or change to anything like \"Ti.Platform.osname == 'android'\";\r\n- Copy the config.json content and initialize or replace all the Alloy.CFG.xxxx variables.\r\n\r\nYour error log suggests that there is another modules or another tiapp.xml gcm related settings conflicting with my module.\r\nTry to remove another module, remove tiapp.xml unused settings, clean the project and build it again.\r\n\r\nFor more questions, take a look at my issue history at:\r\nhttps://github.com/arleyandrada/PushClient\r\n\r\nRegards,\r\n\r\nArley"}}