Reputation: 315
I am working on an android app. This app is divided in 2 app parts, one app part is working as library part, and second part is working on normal task.
I am implementing GCM Push Notification in Library App, so, I'm registering BroadcastReceiver on Library App and Second App. I've given all permission related to GCM Push Notification in Manifest.xml on both related app, but when I run the second app, it gives me GCM BroadcastReceiver Class Error:
java.lang.RuntimeException: Unable to instantiate receiver
com.xxx.xxx.GcmBroadcastReceiver: java.lang.ClassNotFoundException:
Didn't find class "com.xxx.xxx.GcmBroadcastReceiver" on path:
DexPathList[dexElements=[zip file "/data/app/com.xxx.xxx.xxx-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.xxx.xxx.xxx-2, /vendor/lib, /system/lib]]
The app crashed.
And I didn't receive push notification on mobile device.
How can I solve this error?
Upvotes: 1
Views: 176
Reputation: 1289
There must be problem in the way you are exporting libraries in your library project.Check that you are exporting the src and gen folders alongwith private libraries and dependencies. Also delete the private libraries and dependencies and generate them again by doing Right click on project -> Android Tools -> Fix project properties.
Do a clean build and try again
Upvotes: 1