There could be a problem with my configuration, but I cannot figure out what's wrong. I am trying to get appium set up on a Mac for automated testing.
I am running this command:
./reset.sh --android --verbose
I always fail on this step:
* Building Android bootstrap
Running "buildAndroidBootstrap" task
Fatal error: Error finding ant binary, is it on your path?
---- FAILURE: reset.sh exited with status 1 ----
My path is as follows:
# Android and appium config
export ANDROID_HOME=/usr/local/opt/android-sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
What am I doing wrong? Is my path missing something crucial? Googling to try and find out what the ant library is hasn't yielded me much results - what is it? Any help appreciated.
Turns out ant is an apache tool, without which reset.sh will fail for Android. Installing ant with brew fixed the problem.
Related
I a m trying to run Android automation in Robot Framework using Appium but, the following error keeps showing up:
WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb' in ["/Applications/ADT/sdk/platform-tools/platform-tools/adb","/Applications/ADT/sdk/platform-tools/emulator/adb","/Applications/ADT/sdk/platform-tools/tools/adb","/Applications/ADT/sdk/platform-tools/tools/bin/adb"]. Do you have Android Build Tools installed at '/Applications/ADT/sdk/platform-tools'?
I have checked the installation in Android as well.
Any idea how to resolve this kind of issue?
Thank you very much.
I suspect your paths may not be set correctly. For reference, I have the following set in my bash profile:
export ANDROID_HOME=~/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$PATH:$JAVA_HOME/bin
I went through the setup steps - on mac - but the sample nativescript projects all fail with the same error.
"Command ant failed with exit code 1"
Here is the log trace:
https://gist.github.com/getsetbro/c0225e8fc493d57b3f64
Other info
Android Studio on this mac run projects fine in emulators and connected devices
The same projects run in ios emulator without errors.
I installed JDK 8, never had version 7 on this system.
I see the following error in the logs.
Cannot run program "/Users/sb/Documents/Dev/nativescript/test_nativescript/platforms/android/${aapt}"
I might be wrong but it seems aapt tool is missing from your $PATH environment variable. If this is the case, try adding <ANDROID_SDK_ROOT>/tools to $PATH
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 } –
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!
I'm following an android tutorial on ndk and I am trying to run the following command within cygwin
$make - v
but I get the following message:
bash: make: command not found
Can anyone help ?
Launch the setup. Search the packages for "make" and install them...
You should not use cygwin to run ndk-build in NDK version 6 and above. Use ndk-build.cmd from CMD prompt instead. Anyways, NDK contains its own rebuilt make executable on all platforms, which should be used with ndk build scripts.
I am new to calabash-android , i am getting the following error while executing "rake build " command .
C:\calabash-android\ruby-gem>rake build
rake aborted!
cannot load such file -- C:/Ruby193/lib/ruby/gems/1.9.1/gems/popen4-0.1.2/lib/op
en3
lib/calabash-android/helpers.rb:6:in `'
C:/calabash-android/ruby-gem/Rakefile:2:in `load'
C:/calabash-android/ruby-gem/Rakefile:2:in `'
(See full trace by running task with --trace)
These are the steps i have followed
git clone https://github.com/calabash/calabash-android.git
git submodule init
git submodule update
i used gem install popen4
but i again same error
Please help me .
Run the same command, adding --trace at the end, and then post the results, so we have more information available for debugging.
Also, have you tried gem update --system and then gem update popen4? This might solve any issues with the gem.
Why are you trying to build the calabash-android gem itself?
If you don't intend to modify it internally, just install it via gem install calabash-android and you're good to go!