Ewan Valentine
Ewan Valentine

Reputation: 3961

phonegap build problems (android)

When I try to build my app, using Linux ElementaryOS (Ubuntu 12.04 (I think?)) I get thousands of errors saying:

rm: could not remove file (code EACCESS)

The results of the following show:

$ phonegap -v
3.5.0-0.20.4

$ cordova -v
3.5.0-0.2.4

$ ant -v
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed

Any suggestions? I've been battling through several errors for about a week now :(

Thanks in advance!

Update

Update I just changes the permissions of platforms/android too 777 (not a great solution I know). It's now giving me the following:

[Error: An error occurred while listing Android targets] { [Error: /var/www/ppl/app/platforms/android/cordova/build: Command failed with exit code 2] code: 2 } – 

Upvotes: 0

Views: 889

Answers (1)

Ewan Valentine
Ewan Valentine

Reputation: 3961

Okay, after much pain and anguish... I figured it out.

1). I installed ANT after I installed ionic/cordova/phonegap etc, the best order to install everything in is, java, ant, then cordova/phonegap/ionic.

2). I'm using 64-bit Ubuntu, if you are using the same then you need to install several android 32-bit libs.

3). I deleted the entire project (apart from my css, added js files and my html templates), created a new one using $ ionic start test-app then I ran $ ionic platform add android then ran $ ionic run android and it worked.

4). Make sure your paths are correct in ~/.bashrc mine look as followed:

export PATH=$PATH:/home/ewan/adt-bundle/tools
export PATH=$PATH:/home/ewan/adt-bundle/platform-tools

Here's a video that helped me, especially with the 32-bit libs. https://www.youtube.com/watch?v=zEQIwKK7YjY

Don't give up, it's worth it in the end. Best of luck!

Upvotes: 1

Related Questions