I’m using Ubuntu 14.04 LTS and I have done the following:
- Installed Node.js
- Installed Cordova and Ionic command-line tools
- Downloaded and installed Android SDK Tools for Linux (also downloaded Tools, Platform-tools, Build-tools, SDK Platform for API 19 and API 17)
- Set environment variables ANDROID_HOME and ANT_HOME
- Installed some dependencies and libraries for 32-bit because I am running a 64-bit architecture
I try to create a new project as follows:
- $ ionic start myApp tabs
- $ cd myApp
- $ ionic platform add android
- $ ionic build android
The last step is where all the trouble starts. It just won’t build!
Initially build.xml wasn’t created, so I copied the one within the ant directory to the project’s root directory.
Then it was project.properties and then AndroidManifest.xml with the same issue.
When I now try to build, I get the same error.
/home/rajat/Documents/ionic/myApp3/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/home/rajat/Documents/ionic/myApp3/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR building one of the platforms: Error: /home/rajat/Documents/ionic/myApp3/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Running ant debug yields the following:
BUILD FAILED
/home/rajat/Documents/ionic/android-sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/rajat/Documents/ionic/android-sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Some tinkering around has at times shown an error for CordovaLib. I don’t know which one is more relevant.
I’ve been going through a lot of forums but to no avail and am opening this topic as a last resort.
I hope this can be resolved somehow.
Thanks!