Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command 'aapt' was not found in the android SDK #198

Closed
nmaddula opened this issue Jan 6, 2014 · 26 comments
Closed

Command 'aapt' was not found in the android SDK #198

nmaddula opened this issue Jan 6, 2014 · 26 comments

Comments

@nmaddula
Copy link

nmaddula commented Jan 6, 2014

cmd window

Hi Everyone,

I am facing this issue again.
When I made the setup ready and run the Jar file: "java -jar selendroid-standalone-0.7.0-with-dependencies.jar"
I am getting the issue as shown below:
INFO: ################# Selendroid #################
Jan 06, 2014 11:16:06 PM io.selendroid.SelendroidLauncher lauchServer
INFO: Starting selendroid-server port 5555
Jan 06, 2014 11:16:06 PM io.selendroid.SelendroidLauncher lauchServer
SEVER: Selendroid was not able to interact with the Android SDK: Command 'aapt' was not found inside the Android SDK. Please update to the latest development tools and try again.

Please help me out on this.

I have the aapt file inside the build-tools already.

please find the attachment "cmd window" for further reference.

@DominikDary
Copy link
Member

What is the subfolder name under build tools? Usually it is something like 19.0.0 that contains then the aapt executable.

@nmaddula
Copy link
Author

nmaddula commented Jan 7, 2014

Hi DominikDary,

Thanks for the reply.

Yes... I do have the folder which you said. I have other folders also in it till 17.0.0 (Older Versions).

Please let me know If I need to put more details?

@nmaddula
Copy link
Author

nmaddula commented Jan 7, 2014

Hi DominikDary,

I have done some workaround and found that the Selendroid Jar get executed upto some extent.

Now I am getting 2 new issues when i try to run the Jar in the cmd window:

  1. An error occurred while resigning the app 'selendroid-test-app-0.7.0.apk'.
  2. Exception in thread 'main' Could not find the main class: sun.security.tools.jarSigner.

Please refer the screenshot attached for more details.
issue 2

FYI, Please find the configuration details I have done to my system for using Selendroid:

Environment Variables:

  1. JAVA_HOME : C:\Program Files\Java\jre6.
  2. ANDROID_HOME: C:\Softwares\Selenium\Mobile Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk.

3.Path: C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Softwares\Selenium\Mobile Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\platform-tools;C:\Softwares\Selenium\Mobile Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools;C:\Softwares\Selenium\Mobile Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\build-tools

SDK Installed Path:

C:\Softwares\Selenium\Mobile Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk

Build-Tools Folder details:

I have the following sub folders in it:
17.0.0
18.0.1
18.1.0
18.1.1
19.0.1
android-4.4

Test Application Details:

It is Installed on my device and kept the device running before I try to run the Selendroid Standalone server.

Please help me out on this, as I am trying really hard work on Mobile Automation Using Selendroid for a very long time.
Thanks in advance!

@nmaddula
Copy link
Author

nmaddula commented Jan 7, 2014

Hi DominikDary,

I have done some workaround and found that the Selendroid Jar get executed
upto some extent.
Now I am getting 2 new issues when i try to run the Jar in the cmd window:

  1. An error occurred while resigning the app
    'selendroid-test-app-0.7.0.apk'.
  2. Exception in thread 'main' Could not find the main class:
    sun.security.tools.jarSigner.

Please refer the screenshot attached for more details.
[image: issue 2]https://f.cloud.github.com/assets/6331617/1861020/19272c20-77bc-11e3-9fd0-b7516ba67a00.png

FYI, Please find the configuration details I have done to my system for
using Selendroid:
Environment Variables:

JAVA_HOME : C:\Program Files\Java\jre6.
2.

ANDROID_HOME: C:\Softwares\Selenium\Mobile
Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk.

3.Path: C:\Program Files\Common Files\Microsoft Shared\Windows
Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows
Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program
Files (x86)\Windows Live\Shared;C:\Program
Files\Java\jdk1.7.0_45\bin;C:\Softwares\Selenium\Mobile
Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\platform-tools;C:\Softwares\Selenium\Mobile
Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools;C:\Softwares\Selenium\Mobile
Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\build-tools
SDK Installed Path:

C:\Softwares\Selenium\Mobile
Automation\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk
Build-Tools Folder details:

I have the following sub folders in it:
17.0.0
18.0.1
18.1.0
18.1.1
19.0.1
android-4.4
Test Application Details:

It is Installed on my device and kept the device running before I try to
run the Selendroid Standalone server.

Please help me out on this, as I am trying really hard work on Mobile
Automation Using Selendroid for a very long time.
Thanks in advance!

On Tue, Jan 7, 2014 at 1:03 PM, Dominik Dary notifications@github.comwrote:

What is the subfolder name under build tools? Usually it is something like
19.0.0 that contains then the aapt executable.


Reply to this email directly or view it on GitHubhttps://github.com//issues/198#issuecomment-31718314
.

@lukeis
Copy link
Member

lukeis commented Jan 7, 2014

looks like you have the java jre installed and not the jdk? jarsigner is provided in the java jdk, please make sure that is installed and set as the JAVA_HOME

@nmaddula
Copy link
Author

nmaddula commented Jan 7, 2014

Hi Luke,

Thanks a Lot !!!
It worked now...:)
I see the Selendroid server has been started on port 5555.

But when I tried to check whether the device is recognized by opening a browser and navigation to http://localhost:5555/wd/hub/status. on my phone,

I do not see any JSON object coming up.
It shows an error saying: Could not connect to localhost:5555

I have tried this in chrome browser on my phone.

Please advice.

@lukeis
Copy link
Member

lukeis commented Jan 7, 2014

the server at this point is running on your PC, not on the device. Open a browser on your desktop and connect to localhost:5555/wd/hub/status

@dhijaj
Copy link

dhijaj commented Feb 5, 2014

Hi nmaddula,

How did you solve the below error ?

Android SDK: Command 'aapt' was not found inside the Android SDK. Please update to the latest development tools and try again.

@nmaddula
Copy link
Author

nmaddula commented Feb 5, 2014

Hi Dhijaj,

I have updated my SDK from the Android SDK Manager.
Update to the 19th Version and you will find a sub-folder "19.0.1" under Build-Tools Folder.

Let me know if you face any further issues.

@dhijaj
Copy link

dhijaj commented Feb 5, 2014

Thanks nmaddula ,

I have the latest updated build tools 19.0.1 as u said but still am facing the issue. I also have all previous versions in build tools folder!

Command 'aapt' was not found inside the Android SDK. Please update to the latest development tools and try again.

any chance u could give me some solution?

@nmaddula
Copy link
Author

nmaddula commented Feb 6, 2014

Have you made all setup as I said above in my previous posts ?

Also can you paste the stack trace of the error here ? May be a screenshot
of the error would be fine, so that I can see what thr actual error is...
On 6 Feb 2014 05:06, "dhijaj" notifications@github.com wrote:

Thanks nmaddula ,

I have the latest updated build tools 19.0.1 as u said but still am
facing the issue. I also have all previous versions in build tools folder!

Command 'aapt' was not found inside the Android SDK. Please update to the
latest development tools and try again.

any chance u could give me some solution?

Reply to this email directly or view it on GitHub.

@dhijaj
Copy link

dhijaj commented Feb 6, 2014

image

@nmaddula
Copy link
Author

nmaddula commented Feb 6, 2014

I noticed an issue here. Might not be the complete solution yet !

When you trying to start the Selendroid Server, the second part of the code should contain the app name what you are going to add in the server.
And I see that instead of the app i.e., a ".apk" file, you have added a .jar file - the Selendroid Grid Plugin. Remove the plugin content there and add the app name that you are going to automate.

If you want to use Selendroid Grid, Please refer http://selendroid.io/scale.html

Also, check the key points once:

  1. Environment variables set correctly.
  2. You have Jarsigner exe file.(you get it by downloading Java JDK. JRE will not be sufficient)

@dhijaj
Copy link

dhijaj commented Feb 6, 2014

i understand.'

I have set up the E vars correctly. but still no clue. But see the screenshot below.
images

@stergema
Copy link

stergema commented Jul 1, 2014

Did someone found the issue, i am having the same problem for 2 days... :(

@nmaddula
Copy link
Author

nmaddula commented Jul 2, 2014

Can you post the screenshot of ur issue here..
On 1 Jul 2014 22:25, "stergema" notifications@github.com wrote:

Did someone found the issue, i am having the same problem for 2 days... :(


Reply to this email directly or view it on GitHub
#198 (comment)
.

@stergema
Copy link

stergema commented Jul 2, 2014

yes
here it is
snap

@stergema
Copy link

stergema commented Jul 3, 2014

no answer?

@operatiay
Copy link
Contributor

as the error message says you have to update your adt bundle

@stergema
Copy link

stergema commented Jul 3, 2014

its all updatet.

@nmaddula
Copy link
Author

nmaddula commented Jul 3, 2014

Please check ur build tools folders. .. you should have sub folders like
19.0.0 or earlier. .. when I faced the issue I have updated my sdk and
solved the issue
On 3 Jul 2014 20:48, "stergema" notifications@github.com wrote:

its all updatet.


Reply to this email directly or view it on GitHub
#198 (comment)
.

@stergema
Copy link

stergema commented Jul 5, 2014

good morning people, fixed it. thank you

@muffinboy
Copy link

hi stergema,

how did you solved the issue?

I still encountered these error even if I already configured my environment variables (android_home,java_home, path).

Also, my current version of android sdk is 23.0:

android sdk

I got this error:

selendroid error

Hoping you could help me with this.

thanks,

@stergema
Copy link

Hi, i dont remeber, i think i restarted the system(pc), i really dont remember...
Sorry.

On Monday, July 14, 2014 4:19 AM, muffinboy notifications@github.com wrote:

hi stergema,
how did you solved the issue?
I still encountered these error even if I already configured my environment variables (android_home,java_home, path).
Also, my current version of android sdk is 23.0:
I got this error:
Hoping you could help me with this.
thanks,

Reply to this email directly or view it on GitHub.

@muffinboy
Copy link

ok. Does anyone can help me out here?

thanks,

@raghunadhkothuri
Copy link

Hi,
Even i faced this issue, below steps worked for me

  1. Removed all the android_home,java_home, path
  2. Again configured the paths
  3. Restarted my system
    then i didn't see the error, it worked properly.
    once cross check your Android_Home variable path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants