phonegap-build / PushPlugin

This repository is deprecated head to phonegap/phonegap-push-plugin
https://github.com/phonegap/phonegap-plugin-push
MIT License
1.31k stars 996 forks source link

error: Class not fund #506

Open BenjaminHorn opened 9 years ago

BenjaminHorn commented 9 years ago

I'm struggling to get the example to work.

When I run the application I get the following result:

CORDOVA PUSH NOTIFICATION PLUGIN DEMO DEVICE READY EVENT RECEIVED REGISTERED ANDROID ERROR: CLASS NOT FOUND

Just as described in issue #119 . As javapenguin suggested i added

< plugin name="PushPlugin" value="com.plugin.gcm.PushPlugin" />

to config.xml but I still got the problem.

BTW: there is two config,xml : one in the project's root and one in root/platforms/android/res/xml What is the different between of them?

But every time I rebuild

cordova rebuild

The plugin line got deleted. (only from root/platforms/android/res/xml/config.xml)

There is an another thing: In the config.xml I see lines like

<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.media" />

which differ from the suggested plugin line. Is this a newer version to add plugins?

I added the three plugins by CLI:

cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.media
cordova plugin add https://github.com/phonegap-build/PushPlugin.git

And they are in the plugins folder.

ghost commented 9 years ago

I have the same problem (((

BenjaminHorn commented 9 years ago

To everyone having the same problem: look at s2young's comment in #119

"This appears to work for me as well, however when I use the 'cordova serve' option the xml file is rebuilt (excluding this fix). Therefore, using the Phonegap Developer App (http://app.phonegap.com/) to debug my app is out the door until this is truly fixed."

That solved my issue.

emc2spider commented 9 years ago

Any further information on this issue? I just encountered this problem and been trying to solve it for over a day with no results.

rubnvp commented 9 years ago

I solved it just deleting platforms\android\ant-build\res\xml\config.xml, it looks like cordova wasn't updating the final config.xml so it didn't include the plugin reference.