Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build for Android in Cordova v5 #6

Closed
geksiong opened this issue Aug 31, 2015 · 6 comments
Closed

Unable to build for Android in Cordova v5 #6

geksiong opened this issue Aug 31, 2015 · 6 comments
Labels

Comments

@geksiong
Copy link

I'm unable to build for Android on Cordova v5.1.1. iOS builds fine. This article may help: http://ivancevich.me/articles/ignoring-invalid-ssl-certificates-on-cordova-android-ios/

(Edited log extract below)
...
:compileDebugJava
/...../platforms/android/src/de/martinreinhardt/cordova/plugins/CertificatesCordovaWebViewClient.java:31: error: cannot find symbol
import org.apache.cordova.CordovaWebViewClient;
^
symbol: class CordovaWebViewClient
location: package org.apache.cordova
/...../platforms/android/src/de/martinreinhardt/cordova/plugins/CertificatesCordovaWebViewClient.java:47: error: cannot find symbol
public class CertificatesCordovaWebViewClient extends CordovaWebViewClient {
^
symbol: class CordovaWebViewClient
/...../platforms/android/src/de/martinreinhardt/cordova/plugins/CertificatesCordovaWebViewClient.java:86: error: method does not override or implement a method from a supertype
@OverRide
^
/...../platforms/android/src/de/martinreinhardt/cordova/plugins/CertificatesPlugin.java:89: error: cannot find symbol
webView.setWebViewClient(cWebClient);
^
symbol: method setWebViewClient(CertificatesCordovaWebViewClient)
location: variable webView of type CordovaWebView
/...../platforms/android/src/de/martinreinhardt/cordova/plugins/CertificatesPlugin.java:91: error: cannot find symbol
ca.clearCache();
^
symbol: method clearCache()
location: variable ca of type CordovaActivity
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.
5 errors
:compileDebugJava FAILED
...

@hypery2k hypery2k added the bug label Sep 1, 2015
@hypery2k
Copy link
Owner

hypery2k commented Sep 6, 2015

the problem ist that changing that will then fail for all older versions

@escapedcat
Copy link

I think this could be related to the switch from ant to gradle with cordova-android 4.0.0 (Building with Gradle).
I works with cordova 5.3.1 if I specify the android platform to be lower than 4.x.x (i.e. 3.7.1).

To at least make this more transparent the correct engine could be set in plugin.xml. So people get a warning if they use the wrong cordova-android version.

<engines>
    <engine name="cordova" version=">=3.1.0" /><!-- Needs cordova/urlutil -->
    <engine name="cordova-android" version="<4.0.0" />
</engines>

Problem is that you can't use gradle to build. Well back to ant then I guess.
Or is it possible to check for the cordova-android version in the plugin and modify the path accordingly?
Or would it be a good idea to host two versions? Sounds bad though.

@escapedcat
Copy link

https://github.com/danjarvis/cordova-plugin-crosswalk-certificate/blob/master/README.md#install
Maybe something like that could be done.
If you use cordova 5.x use cordova-certificate-plugin@5.0.0.
If you use cordova 4.x or below use cordova-certificate-plugin@4.0.0.

hypery2k added a commit that referenced this issue Oct 7, 2015
hypery2k added a commit that referenced this issue Oct 7, 2015
@xale76
Copy link

xale76 commented Oct 7, 2015

ok we wait for your fix! thank you

@ToKaDev
Copy link

ToKaDev commented Oct 7, 2015

Yes, many thanks in advance!

hypery2k added a commit that referenced this issue Oct 8, 2015
@hypery2k
Copy link
Owner

hypery2k commented Oct 8, 2015

new version is available at https://www.npmjs.com/package/cordova-plugin-certificates

@hypery2k hypery2k closed this as completed Oct 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants