Hi I am trying to setup Ruboto on my Windows 8 and getting the following error even if say yes to download and install Apache via command prompt. Any help is appreciated
C:\>ruboto setup
Java runtime : Found
Java Compiler : Found
Apache ANT : Not found
Android Package Installer: Not found
Android Emulator : Not found
Intel HAXM : Not found
Android SDK Command adb : Not found
Android SDK Command dx : Not found
Platform SDK android-15 : Not found
!!! Ruboto setup is NOT OK !!!
Apache ANT was not found.
Would you like to download and install it? (Y/n): y
Downloading...
Installing apache-ant-1.9.0-bin.tar.gz...
F, [2014-10-05T09:58:23.048000 #15164] FATAL -- : not in gzip format (Zlib::Gzip
File::Error)
org/jruby/ext/zlib/JZlibRubyGzipReader.java:156:in `initialize'
org/jruby/ext/zlib/JZlibRubyGzipReader.java:85:in `new'
org/jruby/ext/zlib/JZlibRubyGzipReader.java:105:in `open'
download ant your self, and unzip to folder "c:\ant" , and udpate PATH with set PATH=c:\ant\bin;%PATH%" , now rerun ruboto setup
you may want to update your system path in windows, so the next time you open a cmd prompt you dont have to add ant path.
Related
I often compare my new build apk size with the production build and I am looking for options to automate this activity such that it compares both new and prod apk sizes and reports me.
I am aware of APK Analyzer of Android Studio but I want to do that using command-line tools. This doc lists the usage of apkanalyzer but upon running this command
apkanalyzer -h apk file-size myapk.apk
It says "'apkanalyzer' is not recognized as an internal or external command, operable program or batch file." though I have already set the environment path to \Android\sdk\tools\bin.
Not sure why command-line is not recognizing this command, could you let me know where I could possibly have gone wrong or is there any other way to check apk file size using command-line?
Thanks for any help in advance.
apkanalyzer is unix shell script, here converted batch script for windows, make sure to change APP_HOME and CLASSPATH to match your setup. save it as apkanalyzer.cmd
#echo off
::##############################################################################
::##
::## apkanalyzer start up script for Windows
::##
::## converted by ewwink
::##
::##############################################################################
::Attempt to set APP_HOME
SET SAVED=%cd%
SET APP_HOME=C:\android\sdk\tools
SET APP_NAME="apkanalyzer"
::Add default JVM options here. You can also use JAVA_OPTS and APKANALYZER_OPTS to pass JVM options to this script.
SET DEFAULT_JVM_OPTS=-Dcom.android.sdklib.toolsdir=%APP_HOME%
SET CLASSPATH=%APP_HOME%\lib\dvlib-26.0.0-dev.jar;%APP_HOME%\lib\util-2.2.1.jar;%APP_HOME%\lib\jimfs-1.1.jar;%APP_HOME%\lib\annotations-13.0.jar;%APP_HOME%\lib\ddmlib-26.0.0-dev.jar;%APP_HOME%\lib\repository-26.0.0-dev.jar;%APP_HOME%\lib\sdk-common-26.0.0-dev.jar;%APP_HOME%\lib\kotlin-stdlib-1.1.3-2.jar;%APP_HOME%\lib\protobuf-java-3.0.0.jar;%APP_HOME%\lib\apkanalyzer-cli.jar;%APP_HOME%\lib\gson-2.3.jar;%APP_HOME%\lib\httpcore-4.2.5.jar;%APP_HOME%\lib\dexlib2-2.2.1.jar;%APP_HOME%\lib\commons-compress-1.12.jar;%APP_HOME%\lib\generator.jar;%APP_HOME%\lib\error_prone_annotations-2.0.18.jar;%APP_HOME%\lib\commons-codec-1.6.jar;%APP_HOME%\lib\kxml2-2.3.0.jar;%APP_HOME%\lib\httpmime-4.1.jar;%APP_HOME%\lib\annotations-12.0.jar;%APP_HOME%\lib\bcpkix-jdk15on-1.56.jar;%APP_HOME%\lib\jsr305-3.0.0.jar;%APP_HOME%\lib\explainer.jar;%APP_HOME%\lib\builder-model-3.0.0-dev.jar;%APP_HOME%\lib\baksmali-2.2.1.jar;%APP_HOME%\lib\j2objc-annotations-1.1.jar;%APP_HOME%\lib\layoutlib-api-26.0.0-dev.jar;%APP_HOME%\lib\jcommander-1.64.jar;%APP_HOME%\lib\commons-logging-1.1.1.jar;%APP_HOME%\lib\annotations-26.0.0-dev.jar;%APP_HOME%\lib\builder-test-api-3.0.0-dev.jar;%APP_HOME%\lib\animal-sniffer-annotations-1.14.jar;%APP_HOME%\lib\bcprov-jdk15on-1.56.jar;%APP_HOME%\lib\httpclient-4.2.6.jar;%APP_HOME%\lib\common-26.0.0-dev.jar;%APP_HOME%\lib\jopt-simple-4.9.jar;%APP_HOME%\lib\sdklib-26.0.0-dev.jar;%APP_HOME%\lib\apkanalyzer.jar;%APP_HOME%\lib\shared.jar;%APP_HOME%\lib\binary-resources.jar;%APP_HOME%\lib\guava-22.0.jar
SET APP_ARGS=%*
::Collect all arguments for the java command, following the shell quoting and substitution rules
SET APKANALYZER_OPTS=%DEFAULT_JVM_OPTS% -classpath %CLASSPATH% com.android.tools.apk.analyzer.ApkAnalyzerCli %APP_ARGS%
::Determine the Java command to use to start the JVM.
SET JAVACMD="java"
where %JAVACMD% >nul 2>nul
if %errorlevel%==1 (
echo ERROR: 'java' command could be found in your PATH.
echo Please set the 'java' variable in your environment to match the
echo location of your Java installation.
echo.
exit /b 0
)
:: execute apkanalyzer
%JAVACMD% %APKANALYZER_OPTS%
While checking the output of appium-doctor command - The following error was seen -
android, apkanalyzer could NOT be found in /Users/{user_name}/Library/Android/sdk!
The solution was to enable Android SDK Command-line tools from Android Studio Preferences
Checkout the screenshot
Hope this helps
APK Analyzer tool is available in android studio https://developer.android.com/studio/build/apk-analyzer.html.
Most the command executable options can be used just with the good UI available in the Android Studio.
The apkanalyzer file (with no extension) in my sdk>tools>bin installed on my windows 10 pc is a Unix Shell script.
Windows doesn't recognize this file as a valid command.
This appears to be a bug in the windows install of the Android SDK Tools 26.1.1.
This means that apkanalyzer does not exist in your SDK path.
To download it, just got to SDK Manager and click on Android SDK Tools, then click Ok to continue and download the missing tools.
SDK manager
As others have mentioned, make sure you have installed the Android SDK Tools via the SDK Manager. They should show up in <your_sdk_root>/tools/bin. A long time ago I added <your_sdk_root>/tools to my $PATH in my ~/.bash_profile, but never added <your_sdk_root>/tools/bin; apparently I missed the note that as of SDK Tools, Revision 25.3.0 tools were deprecated or otherwise moved to there among other places.
Seee also
https://developer.android.com/studio/command-line/ for details on the regular Tools, Build, Platform, and Emulator tools.
In Android Studio > Tools > sdkmanager > install Android SDK Command line tools
This worked for me!
I've submitted a bug report to Google: https://issuetracker.google.com/issues/124064881
Apparently it's broken on Windows.
be sure that Android Studio "Commandline Tools" installed on your system.
Then, add the following information into your system path;
C:\Users\user\AppData\Local\Android\Sdk\tools
C:\Users\user\AppData\Local\Android\Sdk\tools\bin
C:\Users\user\AppData\Local\Android\Sdk\cmdline-tools\latest
C:\Users\user\AppData\Local\Android\Sdk\cmdline-tools\latest\bin
It worked for me..
M. Yaşar Özden
My platform: debian 8 (sid)
uname -a : Linux ... 3.2.0-4-686-pae #1 SMP Debian 3.2.78-1 i686 GNU/Linux
I downloaded android-sdk_r24.4.1-linux.tgz from https://developer.android.com/
but emulator(*) executables don't run because I get :
"bash: tools/emulator: cannot execute binary file: Exec format error. "
I guess this means these binaries can't run on my system. So does it mean , I can't run the emulator on my platform?
I didn't find source of emulator in tgz.
Or where can I find the source of emulator?
thanks
Hehe....
If I downloaded tgz file with wget (wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz), binaries work!
I don't understand why.... ?.... :-|
Didn't work ! :(
This was very strange for me.
When I downloaded tgz and extracted, the binaries worked.
I run SDK manager and downloaded some packages for example : some System Images, Android 6.0 SDK platform, build tools, etc, and after this, binaries didn't work.
I figured it out, the case of problem was I updated current SDK tools. After update The binaries didn't work.
I'm trying to add android platform using cordova but i'm getting that error.
I have problem adding wp7, wp8 and windows 8 as shown below:
I tried a few things found here Phonegap Build android - error "Adding the android platform" ENOENT but doesnt help me. Anyone have any idea how to solve this??
If after type android in cmd says: 'xcopy' was not recognized.
then add to your path: %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;
After 3 days trying to solve the same issue, finally I found the solution. Thank's to:
Installing Phonegap on Windows 7 : The command 'android' failed
(I can't add comments yet)
Download and install node.js
http://nodejs.org/
Install ant using brew and set ANDROID_HOME to your path.
Download and install Homebrew by executing following command in terminal:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Install Apache Ant via Homebrew by executing
brew install ant
set ANDROID_HOME to your path
%ANDROID_HOME%;
I've installed Ruboto Gem and been following their wiki on how to proceed; however I keep getting this prompt every time I run the ruboto setup command:
Java runtime : Found
Java Compiler : Found
Apache ANT : Found
Android Package Installer: Found
Android Emulator : Found
Android SDK Command adb : Not found
Android SDK Command dx : Found
Platform SDK android-10 : Found
!!! Ruboto setup is NOT OK !!!
Java runtime : Found
Java Compiler : Found
Apache ANT : Found
Android Package Installer: Found
Android Emulator : Found
Android SDK Command adb : Not found
Android SDK Command dx : Found
Platform SDK android-10 : Found
!!! Ruboto setup is NOT OK !!!
Android tools not found.
Would you like to download and install it? (Y/n):
even after following through with the download and installation, the problem still persists. I had a similar problem with the dx before and I solved it in the PATH; but this one has no solution elsewhere.
Thank you!
re-download the Android SDK, and you would find that file in:
adt-bundle-linux-x86-20130522/sdk/build-tools/android-4.2.2/
$ sg552#youku:/sg552/adt-bundle-linux-x86-20130522/sdk$ ls build-tools/android-4.2.2/
$ aapt aidl dexdump dx lib llvm-rs-cc NOTICE.txt renderscript source.properties
and then, add it to your PATH:
# your ~/.bashrc file or ~/.bash_profile :
PATH=$PATH:$YOUR_ANDROID_HOME/build-tools/android-4.2.2/
I just installed Android NDK, r5b, and while trying to follow the steps from Exploring the hello-jni Sample, on the command line I receive the error:
MacBook-2:~ mvermant$ cd ndk/samples/hello-jni
MacBook-2:hello-jni mvermant$ android update project -p . -s
-bash: android: command not found
I'm using Eclipse Helios release 2 with Android SDK r10 and ADT 10.0.0 on MAC 10.6.6. I have also checked to have GNU Make 3.81, and installed GNU Awk(though I am not sure it's in the right place).
I've searched a lot, and seems there might be a class path missing somewhere, but I can't figure out where exactly and what to do to fix it.
You should make sure the tools directory of your android-sdk is on your (shell) path.
Something like:
export PATH="/path/to/sdk/tools:$PATH"
before you execute your command.
In general you will also need two other directories to be on your path:
/path/to/sdk/platform-tools - for adb and other android sdk tools
/path/to/ndk - for ndk-build and ndk-gdb, which are ndk tools
You can also do some setup so that you don't have to run these commands every time you open Terminal.