我目前正在尝试使用cordova(phonegap)进入移动设备的跨平台开发。
现在我正在尝试构建cordova.jar - 所以我在一开始。
当我 android update project -p . -t android-15
在我的框架目录中运行时,我得到了输出:
E:\eclipse\cordova-android-master\framework>android update project -p . -t android-15
Updated project.properties
Updated local.properties
build.xml: Found version-tag: custom. File will not be updated.
Updated file E:\eclipse\cordova-android-master\framework\proguard-project.txt
It seems that there are sub-projects. If you want to update them
please use the --subprojects parameter.
然后在我ant jar
在框架目录中运行命令的步骤中,我得到输出:
Buildfile: E:\eclipse\cordova-android-master\framework\build.xml
-check-env:
[checkenv] Android SDK Tools Revision 21
[checkenv] Installed at E:\eclipse\android-sdk-windows
-setup:
[echo] Project Name: Cordova
[gettype] Project Type: Android Library
-pre-clean:
clean:
[delete] Deleting directory E:\eclipse\cordova-android-master\framework\bin
[delete] Deleting directory E:\eclipse\cordova-android-master\framework\gen
[getlibpath] Library dependencies:
[getlibpath] No Libraries
[subant] No sub-builds to iterate on
build-javascript:
-build-setup:
[echo] Resolving Build Target for Cordova...
[gettarget] Project Target: Android 4.0.3
[gettarget] API level: 15
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: E:\eclipse\cordova-android-master\framework\bin
[mkdir] Created dir: E:\eclipse\cordova-android-master\framework\bin\res
[mkdir] Created dir: E:\eclipse\cordova-android-master\framework\gen
[mkdir] Created dir: E:\eclipse\cordova-android-master\framework\bin\classes
[mkdir] Created dir: E:\eclipse\cordova-android-master\framework\bin\dexedLibs
[echo] ----------
[echo] Resolving Dependencies for Cordova...
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with '${build.target}'...
[subant] No sub-builds to iterate on
-pre-build:
-code-gen:
[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...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 53 source files to E:\eclipse\cordova-android-master\framework\bin\classes
[javac] E:\eclipse\cordova-android-master\framework\src\org\apache\cordova\CordovaWebView.java:900: error: cannot find symbol
[javac] settings.setAllowUniversalAccessFromFileURLs(true);
[javac] ^
[javac] symbol: method setAllowUniversalAccessFromFileURLs(boolean)
[javac] location: variable settings of type WebSettings
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 error
有谁知道我做错了什么?
正如自述文件所说,common-codec-1.6.jar 位于 lib 文件夹中。
已安装 android api 级别 15。