When I build android app, it alert [ERROR] Error initializing Cordova: class not found

Hi guys,
When I deploy ionic app to android, it alert [ERROR] Error initializing Cordova: class not found
and LogCat show
Error opening /sys/devices/system/cpu/cpufreq/interactive/boostpulse: Permission denied
Message.
How can I fix this question.(Android 4.3 + JDK 1.6 + OS 10.9.4)
thanks.

I already try
cordova platform rm android
cordova platform add android
but it still not work

I’ve had problems using the Ionic CLI when building apps. After using Ionic CLI to create the project, I’ve just been using the Cordova CLI and I haven’t had problems since.

Maybe try that?

1 Like

Hmm, what version of the cli are you using?

$ ionic --version

thank @meiding.
I use v1.1.6 . and build sidemenu sample project
when I try move the my code to this project
it fix this question.

@mhartington I had this problem with version 1.0.15 as well

Hmm, @meiding are you getting this using the latest version of the CLI?

@mhartington, I’ll do some testing today and let you know

@mhartington

I used cordova 3.5.0 CLI and ionic CLI 1.1.9 for testing out what might be causing this issue. I used all the combinations of

cordova platform add android
ionic platform add android
cordova build
ionic build

while also removing the android platform from finder or using

ionic platform rm android
cordova platform rm android

I found that the problem only occurred when I manually deleted the android folder from platforms using finder. This happened with any combination of the building commands. This doesn’t happen with a plain cordova project so it has to do with the ionic app environment.

If you remove android with CLI and re-add it build fine using any of the commands for me. Not sure why this didn’t work for @jimmy.

If you need any more information let me know. I’m on OS X Mavericks if that helps