剛安裝的PhoneGap的64位Windows 7,並已運行:PhoneGap的運行Android的失敗,「... classes.dex不存在」
phonegap create testpg
cd testpg
phonegap -V run andoid
的最後一個命令,出現以下錯誤消息中止:
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] compiling Android...
[phonegap] Generating config.xml from defaults for platform "android"
[phonegap] Compiling app on platform "android" via command "cmd" /c D:\Dev\projects\testpg\platforms\android\cordova\build
[error] An error occurred while building the android project.Error executing "ant debug -f "D:\Dev\projects\testpg\platforms\android\build.xml"":
BUILD FAILED
D:\Dev\sdk\tools\ant\build.xml:962: The following error occurred while executing this line:
D:\Dev\sdk\tools\ant\build.xml:973: The following error occurred while executing this line:
D:\Dev\sdk\tools\ant\build.xml:313: com.android.sdklib.build.ApkCreationException: java.io.FileNotFoundException: D:\Dev\projects\testpg\platforms\android\bin\classes.dex does not exist
有誰知道發生了什麼事情,我該如何解決這個問題?
在此先感謝!
PS。我試着運行「ant debug -f」D:\ Dev \ projects \ testpg \ platforms \ android \ build.xml「」:
它給出了非常詳細的輸出。這裏是最後一部分:
......................
-dex:
[dex] input: D:\Dev\projects\testpg\platforms\android\bin\classes
[dex] input: D:\Dev\projects\testpg\platforms\android\CordovaLib\bin\classes.jar
[dex] Pre-Dexing D:\Dev\projects\testpg\platforms\android\CordovaLib\bin\classes.jar -> classes-529c048069aff9da86f06bdc712f5b33.jar
[dex] Found Deleted Target File
[dex] Converting compiled files and external libraries into D:\Dev\projects\testpg\platforms\android\bin\classes.dex...
-crunch:
[crunch] Crunching PNG Files in source dir: D:\Dev\projects\testpg\platforms\android\res
[crunch] To destination dir: D:\Dev\projects\testpg\platforms\android\bin\res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] Creating full resource package...
[aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/an...); using existing value in
manifest.
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating HelloWorld-debug-unaligned.apk and signing it with a debug key...
BUILD FAILED
D:\Dev\sdk\tools\ant\build.xml:962: The following error occurred while executing this line:
D:\Dev\sdk\tools\ant\build.xml:973: The following error occurred while executing this line:
D:\Dev\sdk\tools\ant\build.xml:313: com.android.sdklib.build.ApkCreationException: java.io.FileNotFoundException: D:\Dev\projects\testpg\platforms\android\bin\classes.dex does not exist
....................
有趣的是有一條線,說:「[DEX]編譯的文件和外部庫轉換到d:\開發\項目\ testpg \平臺\機器人\ BIN \ classes.dex。 ..「,但最終生成失敗,」java.io.FileNotFoundException:D:\ Dev \ projects \ testpg \ platforms \ android \ bin \ classes.dex不存在「
嘗試運行'%userprofile%\。cordova \ lib \ android \ cordova \ 3.3.0 \ bin \ check_reqs.bat'看看它是否顯示「看起來像你的環境完全支持cordova-android開發!「或者是其他東西。 – QuickFix