WebsiteBeaver / CordovaCall

Cordova CallKit & ConnectionService plugin for iOS/Android that displays the native call UI for VOIP apps
MIT License
196 stars 91 forks source link

fail while build #26

Closed nickpp closed 6 years ago

nickpp commented 6 years ago

After installing the plugin i receive. Build fails even before entering the code. Just after the install.

/Users/user/MyProjects/cordova/dialer/platforms/android/src/com/dmarc/cordovacall/CordovaCall.java:66: error: cannot find symbol if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {

dmarcs commented 6 years ago

@nickpp Thanks for reporting this error. It should be fixed in 913da12. Uninstall and readd CordovaCall 1.1.3 with

cordova plugin rm cordova-call
cordova plugin add cordova-call

The reason this happened is because you have an older version of the Android SDK. It didn't happen for me because I have the latest SDK. android.os.Build.VERSION_CODES.O is a constant that your version of the SDK doesn't recognize, so I replaced it with 26 which is what the constant equals.

Let me know if it's fixed once you try the latest version of this plugin.

nickpp commented 6 years ago

changing the constant to 26 as suggested, did not solve the problem - but I have changed platforms/android/project.properties target=android-26. Solved the problem. Thanks!

dmarcs commented 6 years ago

Glad it works! There were two instances of android.os.Build.VERSION_CODES.O, so maybe you only changed one of them. If you upgraded to 1.1.3 then both instances are replaced, and you shouldn't get the cannot find symbol error.