I am trying to migrate my cordova project to crosswalk.
I am using [following download] (https://download.01.org/crosswalk/releases/crosswalk/android/stable/10.39.235.15/arm/crosswalk-cordova-10.39.235.15-arm.zip) of crosswalk.
My system is having android 4.4 & 4.3 CLI SDK installed.
I want to compile my android app for Android 4.3 (API 18).
"cordova -v" command run output :
4.2.0
"cordova platform version android" command run output :
Installed platforms: android 3.6.4
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, windows, windows8, wp8
I am following following link to Migrate cordova project to crosswalk.
VERSION file contains string :
3.6.3
I am getting following error in "ant dbg" stage. Please suggest how to resolve it ?
"ant dbg" command run output :
debug:
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found Deleted Target File
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 43 source files to D:\HTML_genny\Git\cordova_projects\2_cr
osswalk\2\test\platforms\android\CordovaLib\bin\classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
[javac] D:\HTML_genny\Git\cordova_projects\2_crosswalk\2\test\platforms\andr
oid\CordovaLib\src\com\squareup\okhttp\internal\http\HttpsURLConnectionImpl.java
:347: error: method does not override or implement a method from a supertype
[javac] #Override public void setFixedLengthStreamingMode(long contentLeng
th) {
[javac] ^
[javac] D:\HTML_genny\Git\cordova_projects\2_crosswalk\2\test\platforms\andr
oid\CordovaLib\src\org\apache\cordova\CordovaActivity.java:302: error: cannot fi
nd symbol
[javac] if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
[javac] ^
[javac] symbol: variable KITKAT
[javac] location: class VERSION_CODES
[javac] D:\HTML_genny\Git\cordova_projects\2_crosswalk\2\test\platforms\andr
oid\CordovaLib\src\org\apache\cordova\CordovaActivity.java:309: error: cannot fi
nd symbol
[javac] | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
[javac] ^
[javac] symbol: variable SYSTEM_UI_FLAG_IMMERSIVE_STICKY
[javac] location: class View
[javac] D:\HTML_genny\Git\cordova_projects\2_crosswalk\2\test\platforms\andr
oid\CordovaLib\src\org\apache\cordova\IceCreamCordovaWebViewClient.java:86: erro
r: cannot find symbol
[javac] return android.os.Build.VERSION.SDK_INT >= android.os.Build.
VERSION_CODES.KITKAT && "content".equals(uri.getScheme());
[javac]
^
[javac] symbol: variable KITKAT
[javac] location: class VERSION_CODES
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 4 errors
[javac] 3 warnings
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:720: The followin
g error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:734: Compile fail
ed; see the compiler error output for details.
Total time: 4 seconds
I've only been using crosswalk 9+cordova 3.5, but I think you should try to use cordova android 3.6.3 instead of 3.6.4 :
cordova platform remove android
cordova platform add android#3.6.3
And then you can follow again the migration guide and replace the cordova-lib with crosswalk-cordova.
And make sure to specify --target "android-19" when building xwalk_core_library.
Ok, I've made a little search about the error message you have.
The error says method setFixedLengthStreamingMode(long contentLength) is not found in HttpsURLConnectionImpl.java.
It seems setFixedLengthStreamingMode is new from java 7, so my guess is you are using an older version of java.
To be sure, run java -version in a terminal.If the output displays Java version 1.6.x, then your problem should be solved after upgrading to java 7 or 8.
Related
I'm trying to compile a new project on cmd using cocos2d-x v3.10, but the build is failing and I'm getting the following error:
The output as seen on cmd.
-pre-compile:
-compile:
[javac] Compiling 29 source files to D:\Varun\MyApp\MyApp\cocos2d\cocos\platform
\android\java\bin\classes
[javac] error: error reading D:\Varun\MyApp\MyApp\cocos2d\cocos\platform\android
\java\libs\._android-async-http-1.4.8.jar; error in opening zip file
[javac] warning: [options] source value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
[javac] 1 error
[javac] 3 warnings
BUILD FAILED
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:601: The following
error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:720: The following
error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:734: Compile faile
d; see the compiler error output for details.
Total time: 2 seconds
Error running command, return code: 1.
I'm using the following:
JDK: 1.8.0_73
Android api: 19
NDK: r9
Ant: 1.9.6
Python: 2.7.11
I think ._android-async-http-1.4.8.jar is a hidden file or the file is corrupted.
For case one, just rename it to android-async-http-1.4.8.jar and refer it to again.
For case two, just download a new one.
I'm trying to compile the examples included in GStreamer. I'm following this tutorial
but I can't compile any of the included examples because ant debug give me this error:
-compile:
[javac] Compiling 4 source files to F:\Android\gstreamer\share\gst-sdk\tutorials\android-tutorial-1\bin\classes
[javac] F:\Android\gstreamer\share\gst-sdk\tutorials\android-tutorial-1\src\com\gst_sdk_tutorials\tutorial_1\Tutorial1.java:8: package com.gstreamer does not exist
[javac] import com.gstreamer.GStreamer;
[javac] ^
[javac] F:\Android\gstreamer\share\gst-sdk\tutorials\android-tutorial-1\src\com\gst_sdk_tutorials\tutorial_1\Tutorial1.java:20: cannot find symbol
[javac] symbol : variable GStreamer
[javac] location: class com.gst_sdk_tutorials.tutorial_1.Tutorial1
[javac] GStreamer.init(this);
[javac] ^
[javac] 2 errors
BUILD FAILED
F:\Android\android-sdk\tools\ant\build.xml:716: The following error occurred while executing this line:
F:\Android\android-sdk\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
Total time: 1 second
I have installed the latest version of android ndk and android sdk, I'm using API 19 and gstreamer 1.7.1 (gstreamer-1.0-android-arm-1.7.1.tar.bz2) downloaded from here; I'm using CygWin64 as required in the tutorial and ANT from Apache. I have also declared all the required local variables.
I can run the first command: android update project -p . -s --target 19
and also the second: ndk-build
If the compiling process is not possible with the command line, where can I get a working version of Eclipse with adt plugins?
I solved: since I'm using Gstreamer 1.7.1 the import line import com.gstreamer.GStreamer; must be changed into import org.freedesktop.gstreamer.GStreamer;.
Cordova version: 4.3.0
java version "1.8.0_40" 64bit
OS X 10.10.2
Ant version: 1.9.4
Target android SDK I'm using is 19.
When I run 'ant release' in the platforms/android/CordovaLib folder I get the following output with error:
Buildfile: .../platforms/android/CordovaLib/build.xml
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}
-pre-build:
-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at /Users/.../Library/Android/sdk
-setup:
[echo] Project Name: MainActivity
[gettype] Project Type: Android Library
-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
[echo] Resolving Build Target for MainActivity...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: .../platforms/android/CordovaLib/bin/rsObj
[mkdir] Created dir: .../platforms/android/CordovaLib/bin/rsLibs
[echo] ----------
[echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 98 source files to .../platforms/android/CordovaLib/bin/classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebViewClient.java:35: error: cannot find symbol
[javac] import android.webkit.ClientCertRequest;
[javac] ^
[javac] symbol: class ClientCertRequest
[javac] location: package android.webkit
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebViewClient.java:145: error: cannot find symbol
[javac] public void onReceivedClientCertRequest (WebView view, ClientCertRequest request)
[javac] ^
[javac] symbol: class ClientCertRequest
[javac] location: class CordovaWebViewClient
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaChromeClient.java:342: error: cannot find symbol
[javac] public boolean onShowFileChooser(WebView webView, final ValueCallback<Uri[]> filePathsCallback, final WebChromeClient.FileChooserParams fileChooserParams) {
[javac] ^
[javac] symbol: class FileChooserParams
[javac] location: class WebChromeClient
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java:25: error: cannot find symbol
[javac] import android.webkit.ClientCertRequest;
[javac] ^
[javac] symbol: class ClientCertRequest
[javac] location: package android.webkit
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java:32: error: cannot find symbol
[javac] private final ClientCertRequest request;
[javac] ^
[javac] symbol: class ClientCertRequest
[javac] location: class CordovaClientCertRequest
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java:34: error: cannot find symbol
[javac] public CordovaClientCertRequest(ClientCertRequest request) {
[javac] ^
[javac] symbol: class ClientCertRequest
[javac] location: class CordovaClientCertRequest
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaChromeClient.java:340: error: cannot find symbol
[javac] #TargetApi(Build.VERSION_CODES.LOLLIPOP)
[javac] ^
[javac] symbol: variable LOLLIPOP
[javac] location: class VERSION_CODES
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java:197: error: cannot find symbol
[javac] if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
[javac] ^
[javac] symbol: variable LOLLIPOP
[javac] location: class VERSION_CODES
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebView.java:200: error: cannot find symbol
[javac] cookieManager.setAcceptThirdPartyCookies(this, true);
[javac] ^
[javac] symbol: method setAcceptThirdPartyCookies(CordovaWebView,boolean)
[javac] location: variable cookieManager of type CookieManager
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaWebViewClient.java:143: error: method does not override or implement a method from a supertype
[javac] #Override
[javac] ^
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaChromeClient.java:341: error: method does not override or implement a method from a supertype
[javac] #Override
[javac] ^
[javac] .../platforms/android/CordovaLib/src/org/apache/cordova/CordovaChromeClient.java:348: error: cannot find symbol
[javac] Uri[] result = WebChromeClient.FileChooserParams.parseResult(resultCode, intent);
[javac] ^
[javac] symbol: variable FileChooserParams
[javac] location: class WebChromeClient
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 12 errors
[javac] 3 warnings
BUILD FAILED
/Users/.../Library/Android/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/Users/.../Library/Android/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 3 seconds
android, ant, java are all in in the PATH.
I've tried fiddling with the target sdks and tried downloading different versions but I've run out of ideas. Any help would be much appreciated.
AndroidManifest - from CordovaLib folder:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.apache.cordova" android:versionName="1.0" android:versionCode="1">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
</manifest>
Don't understand why it refers to LOLLIPOP in the error message and then why can't it find it since it's installed.
I think it's because the Cordova 4.3.0 has referenced the android.webkit.ClientCertRequest, which is newly added in API level 21.
FYI: https://developer.android.com/reference/android/webkit/ClientCertRequest.html
Install Android build tools version 21 and 22 from SDK Manager.
Once the build tools are installed, remove the platforms folder inside your app.
Go to Cordova and add the android platform again (using cordova platform add android command).
Once the platform is reinstalled, rebuild the app (using cordova build command) and it will build successfully
Your Cordova is too high to work with Android Api 19. Meaning it's newer so it references libraries that Api 19 doesn't have and gives an error. So you need to dumb it down a little bit.
Uninstall it:
sudo npm uninstall -g cordova
And then install an older version of cordova that works well with Api 19:
sudo npm install -g cordova#4.0.0
and now do everything again from scratch. "cordova create blabla", "cordova
platform add android", "cordova run android", etc.
To get a list of cordova versions do:
npm view cordova versions
But I know that 4.0.0 will work with Api 19 since I had the same problem.
I'm doing everything exactely as in instruction: https://crosswalk-project.org/documentation/cordova/migrate_an_application.html
After succesfull build of xwalk_core_library and CordovaLib
Im running cordova build android and facing error:
[javac] Compiling 8 source files to D:\myapp\platforms\android\bin\classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] D:\myapp\platforms\android\src\com\in2circle\fellor\CordovaApp.java:33: error: cannot find symbol
[javac] loadUrl(launchUrl);
[javac] ^
[javac] symbol: variable launchUrl
[javac] location: class CordovaApp
[javac] 1 error
Crosswalk v 9.38.208.10.
Crosswalk v 9.38.208.10 plays well with Cordova 3.5.. I have had installed cordova 4..
Updated to Crosswalk v 10.39.235.9 and problem was solved.
So use Crosswalk v 10 for Cordova v 4.
Command:
C:\Users\Vince\Desktop\cordova-android\framework>ant jar
Build:
-check-env:
[checkenv] Android SDK Tools Revision 23.0.2
[checkenv] Installed at D:\softs\android-SDK
-setup:
[echo] Project Name: Cordova
[gettype] Project Type: Android Library
-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for Cordova...
[gettarget] Project Target: Android 4.3
[gettarget] API level: 18
[echo] ----------
ERROR:
[javac] symbol: method setWebContentsDebuggingEnabled(boolean)
[javac] location: class CordovaWebView
[javac] C:\Users\Vince\Desktop\cordova-android\framework\src\org\apache\co
rdova\IceCreamCordovaWebViewClient.java:78: error: cannot find symbol
[javac] return android.os.Build.VERSION.SDK_INT >= android.os.Build.
VERSION_CODES.KITKAT && "content".equals(uri.getScheme());
[javac]
^
[javac] symbol: variable KITKAT
[javac] location: class VERSION_CODES
[javac] Note: C:\Users\Viince\Desktop\cordova-android\framework\src\org\apa
che\cordova\CordovaWebView.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 4 errors
BUILD FAILED
D:\softs\android-SDK\tools\ant\build.xml:720: The following error occurred while
executing this line:
D:\softs\android-SDK\tools\ant\build.xml:734: Compile failed; see the compiler e
rror output for details.
Total time: 1 second
Any advice to take down this error would be great! thanks to all people who will put an answer. I have Android SDK build-tools 20.
I fixed this exact error by opening the project in Eclipse and then right clicking on the CordovaLib Project then properties, and then under 'Android' ensuring API version 19 was selected.
This matched what i had selected in My App project and what is entered below.
Then i ran the commands as described here:
https://github.com/Wizcorp/phonegap-facebook-plugin/blob/master/platforms/android/README.md
android update project -p platforms/android/
cd platforms/android/
ant clean
cd FacebookLib
ant clean
open -e AndroidManifest.xml
// change your minSdkVersion and your targetSdkVersion to your environment settings for me it was:
// <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
ant release
cd ../../..
cordova build android