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

PhoneGap Build Error for Android #29

Closed abardik closed 6 years ago

abardik commented 6 years ago

PGB could not build the last version of CordovaCall for Android. Please, see the PGB log attached.

/src/com/dmarc/cordovacall/CordovaCall.java:68: error: cannot find symbol
                  .setCapabilities(PhoneAccount.CAPABILITY_SELF_MANAGED)
                                               ^
  symbol:   variable CAPABILITY_SELF_MANAGED
  location: class PhoneAccount
/src/com/dmarc/cordovacall/CordovaCall.java:171: error: cannot find symbol
                  .setCapabilities(PhoneAccount.CAPABILITY_SELF_MANAGED)
                                               ^
  symbol:   variable CAPABILITY_SELF_MANAGED
  location: class PhoneAccount
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 36.795 secs
Error: /gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/src/com/dmarc/cordovacall/CordovaCall.java:68: error: cannot find symbol
                  .setCapabilities(PhoneAccount.CAPABILITY_SELF_MANAGED)
                                               ^
  symbol:   variable CAPABILITY_SELF_MANAGED
  location: class PhoneAccount
/src/com/dmarc/cordovacall/CordovaCall.java:171: error: cannot find symbol
                  .setCapabilities(PhoneAccount.CAPABILITY_SELF_MANAGED)
                                               ^
  symbol:   variable CAPABILITY_SELF_MANAGED
  location: class PhoneAccount
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

FAILURE: Build failed with an exception.
abardik commented 6 years ago

The issue is started from 1.1.1 (1.1.0 is built successfully for both platforms). Strating from 1.1.1 it's failed for Android (for iOS everything is ok).

D-Marc1 commented 6 years ago

This is due to a change that requires you to update your Android SDK. Look at #27 to guide you through. We'll likely add this to README.md pretty soon.

abardik commented 6 years ago

@D-Marc1 Thank you for the refference, I didn't look to the closed issues. So, regarding to PGB, do I need to just change android-targetSdkVersion to 26? What about android-minSdkVersion? Now I have 21 (Android 5).

D-Marc1 commented 6 years ago

No, this has nothing to do with that. You have to update your SDK in Android Studio to 26 or higher. You'll also need to make sure your cordova-android is 6.2.3 or higher for your platform

abardik commented 6 years ago

But I use PhoneGap Build (cli 7.0.1, cordova-android 6.2.3), not Android Studio.

D-Marc1 commented 6 years ago

That seems like it should be fine. I've never used Phonegap Build, but I assume it would have the correct API level corresponding to it. If you tried it with what you stated, then the only other things I could think of is for you to try changing the targetSDK like you said, or upgrade cordova-android to a higher version if it still doesn't work. Other then that, I'm not really sure what else.

abardik commented 6 years ago

android-targetSDKVersion changed to 26 with no result. I still can use 1.1.0 and wait until PGB upgrade their SDK. Thank you for your help.

D-Marc1 commented 6 years ago

That's good at least. Hopefully they'll update it soon.