Cordova Ant Release返回无效文件:... / CordovaLib / build.xml

时间:2016-02-01 12:27:45

标签: java android cordova ant cordova-3

我创建了一个Keystore文件 在platforms / android文件夹中创建了一个ant.propeties文件 更新了我的项目:

android update project -p /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android

运行以下命令以创建我的Android应用程序的发布版本:

cordova build android

ant release

运行以下命令后,返回:

[abiswas@localhost android]$ ant release
Buildfile: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/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.4.1
 [checkenv] Installed at /opt/adt-bundle-linux-x86_64-20140702/sdk

-setup:
     [echo] Project Name: com.personal.rockstarpopstar
  [gettype] Project Type: Application

-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.1
     [echo] Resolving Build Target for com.personal.rockstarpopstar...
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/libs
    [mkdir] Created dir: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/bin/rsObj
    [mkdir] Created dir: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/bin/rsLibs
    [mkdir] Created dir: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/bin/classes
    [mkdir] Created dir: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for com.personal.rockstarpopstar...
[dependency] Library dependencies:
[dependency] 
[dependency] ------------------
[dependency] Ordered libraries:
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'release'...

BUILD FAILED
/opt/adt-bundle-linux-x86_64-20140702/sdk/tools/ant/build.xml:597: Invalid file: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/CordovaLib/build.xml

Total time: 1 second
[abiswas@localhost android]$ ant debug -f "/home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/build.xml"
Buildfile: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1
 [checkenv] Installed at /opt/adt-bundle-linux-x86_64-20140702/sdk

-setup:
     [echo] Project Name: com.personal.rockstarpopstar
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.1
     [echo] Resolving Build Target for com.personal.rockstarpopstar...
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for com.personal.rockstarpopstar...
[dependency] Library dependencies:
[dependency] 
[dependency] ------------------
[dependency] Ordered libraries:
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...

BUILD FAILED
/opt/adt-bundle-linux-x86_64-20140702/sdk/tools/ant/build.xml:597: Invalid file: /home/abiswas/workspace/rockstarpopstarAppFolder/platforms/android/CordovaLib/build.xml

Total time: 1 second

无法构建发布版本以在Play商店中上传应用。

1 个答案:

答案 0 :(得分:0)

打开命令提示符并键入

android update project -p your_project_follder_path/platforms/android/CordovaLib

现在关闭并打开命令提示符,转到项目下的platforms / android并运行ant release

对我有用!