appView 是 cordovaActivity.appVeiw DownloadListener 是 webkit.DownloadListener 我也在场景中使用 Crosswalk。
DownloadListener dl = new DownloadListener() {
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
finish();
}
};
appView.setDownloadListener(dl);
它在编译时出错
sample.java:###: error: cannot find symbol
[javac] appView.setDownloadListener(dl);
[javac] ^
[javac] symbol: method setDownloadListener(DownloadListener)
[javac] location: variable appView of type CordovaWebView
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 error
知道如何解决这个问题吗?