科尔多瓦人行横道项目迁移——错误
cordova crosswalk project migration -- error
我正在尝试将我的 cordova 项目迁移到人行横道。
我正在使用人行横道的【后续下载】(https://download.01.org/crosswalk/releases/crosswalk/android/stable/10.39.235.15/arm/crosswalk-cordova-10.39.235.15-arm.zip)
我的系统安装了 android 4.4 和 4.3 CLI SDK。
我想为 Android 4.3 (API 18).
编译我的 android 应用程序
"cordova -v"命令运行输出:
4.2.0
"cordova platform version android"命令运行输出:
Installed platforms: android 3.6.4
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, windows, windows8, wp8
我正在关注 following link 将 cordova 项目迁移到人行横道。
VERSION 文件包含字符串:
3.6.3
我在 "ant dbg" 阶段遇到以下错误。请建议如何解决它?
"ant dbg"命令运行输出:
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_cr
osswalk\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_crosswalk\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_crosswalk\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_crosswalk\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_crosswalk\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
我只使用过 crosswalk 9+cordova 3.5,但我认为你应该尝试使用 cordova android 3.6.3 而不是 3.6.4 :
cordova platform remove android
cordova platform add android@3.6.3
然后您可以再次按照迁移指南将 cordova-lib 替换为 crosswalk-cordova。
并确保在构建时指定 --target "android-19" xwalk_core_library。
好的,我已经对您的错误消息进行了一些搜索。
错误提示方法 setFixedLengthStreamingMode(long contentLength) 在 HttpsURLConnectionImpl.java 中找不到。
setFixedLengthStreamingMode 似乎是 java 7 的新功能,所以我猜你使用的是旧版本的 java。
可以肯定的是,运行 java -version
in a terminal.If 输出显示 Java version 1.6.x,那么你的问题应该在之后解决升级到 java 7 或 8。
我正在尝试将我的 cordova 项目迁移到人行横道。
我正在使用人行横道的【后续下载】(https://download.01.org/crosswalk/releases/crosswalk/android/stable/10.39.235.15/arm/crosswalk-cordova-10.39.235.15-arm.zip)
我的系统安装了 android 4.4 和 4.3 CLI SDK。 我想为 Android 4.3 (API 18).
编译我的 android 应用程序"cordova -v"命令运行输出:
4.2.0
"cordova platform version android"命令运行输出:
Installed platforms: android 3.6.4
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, windows, windows8, wp8
我正在关注 following link 将 cordova 项目迁移到人行横道。
VERSION 文件包含字符串:
3.6.3
我在 "ant dbg" 阶段遇到以下错误。请建议如何解决它?
"ant dbg"命令运行输出:
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_cr
osswalk\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_crosswalk\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_crosswalk\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_crosswalk\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_crosswalk\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
我只使用过 crosswalk 9+cordova 3.5,但我认为你应该尝试使用 cordova android 3.6.3 而不是 3.6.4 :
cordova platform remove android
cordova platform add android@3.6.3
然后您可以再次按照迁移指南将 cordova-lib 替换为 crosswalk-cordova。
并确保在构建时指定 --target "android-19" xwalk_core_library。
好的,我已经对您的错误消息进行了一些搜索。
错误提示方法 setFixedLengthStreamingMode(long contentLength) 在 HttpsURLConnectionImpl.java 中找不到。
setFixedLengthStreamingMode 似乎是 java 7 的新功能,所以我猜你使用的是旧版本的 java。
可以肯定的是,运行 java -version
in a terminal.If 输出显示 Java version 1.6.x,那么你的问题应该在之后解决升级到 java 7 或 8。