Ionic build without any error code BUT no apk and ant-build repository are created


#1

Hi guys!
I have also the same issue, you can see the output console in attachment:
Cordova build without any error code BUT no apk and ant-build repository are created.
I use:
Java 1.8
ant 1.9.4
Android SDK with API version 19
cordova 4.1.2
Ionic v1.0.0-beta 14
=> On Windows 8.1

Can anyone help me to fix this issue?
Have you some idea to solve this trouble?

Thanks


#2

C:\wamp\www\ionic\hello>cordova build android
Running command: C:\wamp\www\ionic\hello\platforms\android\cordova\build.bat
Buildfile: C:\wamp\www\ionic\hello\platforms\android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at C:\Dev\Androidsdk

-setup:
[echo] Project Name: CordovaApp
[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for CordovaAppā€¦
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if neededā€¦
[mkdir] Created dir: C:\wamp\www\ionic\hello\platforms\android\ant-build\rsO
bj
[mkdir] Created dir: C:\wamp\www\ionic\hello\platforms\android\ant-build\rsL
ibs
[echo] ----------
[echo] Resolving Dependencies for CordovaAppā€¦
[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:\Dev\Androidsdk

-setup:
[echo] Project Name: CordovaApp
[gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for CordovaAppā€¦
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if neededā€¦
[mkdir] Created dir: C:\wamp\www\ionic\hello\platforms\android\CordovaLib\an
t-build\rsObj
[mkdir] Created dir: C:\wamp\www\ionic\hello\platforms\android\CordovaLib\an
t-build\rsLibs
[echo] ----------
[echo] Resolving Dependencies for CordovaAppā€¦
[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] No need to generate new BuildConfig.

-pre-compile:

-compile:
[echo] Creating library output jar fileā€¦

-post-compile:

-obfuscate:

-dex:
[echo] Library project: do not convert bytecodeā€¦

-crunch:
[crunch] Crunching PNG Files in source dir: C:\wamp\www\ionic\hello\platforms
\android\CordovaLib\res
[crunch] To destination dir: C:\wamp\www\ionic\hello\platforms\android\Cordov
aLib\ant-build\res
[crunch] Crunched 0 PNG files to update cache

-package-resources:
[echo] Library project: do not package resourcesā€¦

-package:
[echo] Library project: do not package apkā€¦

-post-package:

-do-debug:
[echo] Library project: do not create apkā€¦
[propertyfile] Updating property file: C:\wamp\www\ionic\hello\platforms\android
\CordovaLib\ant-build\build.prop
[propertyfile] Updating property file: C:\wamp\www\ionic\hello\platforms\android
\CordovaLib\ant-build\build.prop
[propertyfile] Updating property file: C:\wamp\www\ionic\hello\platforms\android
\CordovaLib\ant-build\build.prop
[propertyfile] Updating property file: C:\wamp\www\ionic\hello\platforms\android
\CordovaLib\ant-build\build.prop

-post-build:

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:
[echo] Set jars path to: C:\wamp\www\ionic\hello\platforms\android\CordovaL
ib\ant-build\classes.jar

-compile:
[javac] Compiling 3 source files to C:\wamp\www\ionic\hello\platforms\androi
d\ant-build\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] 3 warnings

-post-compile:

-obfuscate:

-dex:
[dex] input: C:\wamp\www\ionic\hello\platforms\android\ant-build\classes
[dex] input: C:\wamp\www\ionic\hello\platforms\android\CordovaLib\ant-buil
d\classes.jar
[dex] Using Pre-Dexed classes-5e20a510fff4deccd76d72846c821856.jar <- C:\w
amp\www\ionic\hello\platforms\android\CordovaLib\ant-build\classes.jar
[dex] Found Deleted Target File
[dex] Converting compiled files and external libraries into C:\wamp\www\io
nic\hello\platforms\android\ant-build\classes.dexā€¦
[dx] Merged dex A (7 defs/2.2KiB) with dex B (209 defs/317.0KiB). Result
is 216 defs/388.5KiB. Took 0.1s

-crunch:
[crunch] Crunching PNG Files in source dir: C:\wamp\www\ionic\hello\platforms
\android\res
[crunch] To destination dir: C:\wamp\www\ionic\hello\platforms\android\ant-bu
ild\res
[crunch] Processing image to cache: C:\wamp\www\ionic\hello\platforms\android
\res\drawable-xhdpi\icon.png => C:\wamp\www\ionic\hello\platforms\android\ant-bu
ild\res\drawable-xhdpi\icon.png
[crunch] (processed image to cache entry C:\wamp\www\ionic\hello\platforms
android\ant-build\res\drawable-xhdpi\icon.png: 53% size of source)
[crunch] Processing image to cache: C:\wamp\www\ionic\hello\platforms\android
\res\drawable\icon.png => C:\wamp\www\ionic\hello\platforms\android\ant-build\re
s\drawable\icon.png
[crunch] (processed image to cache entry C:\wamp\www\ionic\hello\platforms
android\ant-build\res\drawable\icon.png: 53% size of source)
[crunch] Crunched 2 PNG files to update cache

-package-resources:
[aapt] Creating full resource packageā€¦

-package:
[apkbuilder] Current build type is different than previous build: forced apkbuil
der run.
[apkbuilder] Creating CordovaApp-debug-unaligned.apk and signing it with a debug
keyā€¦

-post-package:

-do-debug:
[zipalign] Running zip align on final apkā€¦
[echo] Debug Package: C:\wamp\www\ionic\hello\platforms\android\ant-build\C
ordovaApp-debug.apk
[propertyfile] Creating new property file: C:\wamp\www\ionic\hello\platforms\and
roid\ant-build\build.prop
[propertyfile] Updating property file: C:\wamp\www\ionic\hello\platforms\android
\ant-build\build.prop
[propertyfile] Updating property file: C:\wamp\www\ionic\hello\platforms\android
\ant-build\build.prop
[propertyfile] Updating property file: C:\wamp\www\ionic\hello\platforms\android
\ant-build\build.prop

-post-build:
[move] Moving 1 file to C:\wamp\www\ionic\hello\platforms\android\ant-build

 [move] Moving 1 file to C:\wamp\www\ionic\hello\platforms\android\CordovaLi

b\ant-build

debug:

BUILD SUCCESSFUL
Total time: 17 seconds
Built the following apk(s):

C:\wamp\www\ionic\hello>


#3

I try to understand a little bit more what itā€™s append!
The ant build seems to be ok but no ant-build repository and apk is generated.
I try to debug cordova build.js script but it seems to be ok.
But when I launch this ant command
=> ant debug -f ā€œC:\Users\Pierre\cordova\platforms\android\build.xmlā€ -Dout.dir=ant-build -Dgen.absolute.dir=ent-gen
The ant tags (in build.xml file) does nothing!
My OS is Windows 8.1.

But on my other OS (Windows 7), all works fine!!!

I use apache ant 1.9.4 (Release on May 2014)

Can anyone have some ideas?


#4

Hi,

I found the issue. This weird behaviour come from my Comodo antivirus and its sandboxed virtual environment.
Comodo create a virtual folder call VTRoot and all cordova build are inside!!! Go to C:\VTRoot\HarddiskVolumexxx/ and you will see your buildā€¦

I hope this solution could help!

Bye