运行“ionic run android”时,Ionic BUILD 失败
2015-03-26
2195
运行时出现莫名其妙的错误
ionic run android
我设置好了一切,安装了它说我需要的所有软件包,插入了我的 Android 并在
adb
中进行了验证,但当我运行 ionic Android 时,我得到了:
C:\Users\Imray\Projects\appsnstuff\myApp
λ ionic run android
Adding in default Ionic hooks
Running command: "C:\Program Files\nodejs\node.exe" "C:\Users\Imray\Projects\appsnstuff\myApp\hooks\after_prepare\010_add_platform_class.js" "C:\Users\Imray\Projects\appsnstuff\myApp"
add to body class: platform-android
Running command: "C:\Program Files\nodejs\node.exe" "C:\Users\Imray\Projects\appsnstuff\myApp\hooks\after_prepare\020_remove_sass_from_platforms.js" "C:\Users\Imray\Projects\appsnstuff\myApp"
Running command: cmd "/s /c ""C:\Users\Imray\Projects\appsnstuff\myApp\platforms\android\cordova\run.bat"""
WARNING : No target specified, deploying to device '9f55d3c0'.
Buildfile: C:\Users\Imray\Projects\appsnstuff\myApp\platforms\android\build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at C:\Users\Imray\Android Practice\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk
-setup:
[echo] Project Name: MainActivity
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
[echo] Resolving Build Target for MainActivity...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
nodeps:
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at C:\Users\Imray\Android Practice\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk
-setup:
[echo] Project Name: MainActivity
[gettype] Project Type: Android Library
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
[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: C:\Users\Imray\Projects\appsnstuff\myApp\platforms\android\CordovaLib\ant-build\rsObj
[mkdir] Created dir: C:\Users\Imray\Projects\appsnstuff\myApp\platforms\android\CordovaLib\ant-build\rsLibs
[echo] ----------
[echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
-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 new input file
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 98 source files to C:\Users\Imray\Projects\appsnstuff\myApp\platforms\android\CordovaLib\ant-build\classes
[javac] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] C:\Users\Imray\Projects\appsnstuff\myApp\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] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 12 errors
BUILD FAILED
C:\Users\Imray\Android Practice\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:601: The following error occurred while executing this line:
C:\Users\Imray\Android Practice\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:720: The following error occurred while executing this line:
C:\Users\Imray\Android Practice\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.
Total time: 2 seconds
C:\Users\Imray\Projects\appsnstuff\myApp\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant debug -f "C:\Users\Imray\Projects\appsnstuff\myApp\platforms\android\build.xml" -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR running one or more of the platforms: Error: cmd: Command failed with exit code 8
You may not have the required environment or OS to run this project
1个回答
我昨晚将我的 Android SDK 更新至 21,现在可以正常工作了。
CodyBugstein
2015-03-28