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


#1

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


#2

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?


#3

Hmm, what version of the cli are you using?

$ ionic --version

#4

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.


#5

@mhartington I had this problem with version 1.0.15 as well


#6

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


#7

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


#8

@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