I have been running the command aapt list -a on an APK file but i keep having the error:
appt command not found.
I have check the Android-SDKs built-tools and the aapt file exist in the location.
Please, what do i need to do to fix that?
You need to set path.
Go to system properties -->Environment variables -->New/Edit "PATH"
Add C:\\AppData\Local\Android\android-sdk\platform-tools
Refer How to Add set path
Related
How to solve artoolkit nftBook issues in android studio
When I run the command ndk-build in android studio terminal for nft book it shows the error like:
clang++.exe: error: linker command failed with exit code 1 (use -v to
see invocation) make: *** [obj/local/armeabi/libnftBookNative.so]
Error 1
How can I solve this?
You should not run it in the android studio terminal but in the Git-Bash.
Read the documentation more closely :).
You look like you are working from Windows so you need to use Git-Bash for compilation.
See: http://artoolkit.org/community/forums/viewtopic.php?f=26&t=17092
===========
EDIT:
Make sure you have these environment variables set:
- Set ANDROID_HOME to indicate the path to root folder of the downloaded Android SDK.
Set ANDROID_NDK_ROOT to indicate the path to root folder (most likely, “ndk-bundle”) of the downloaded NDK. The ANDROID_HOME environment variable can be used to help define NDK.
ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
Set NDK to the same path as ANDROID_NDK_ROOT. NDK=$ANDROID_NDK_ROOT
Set PATH to include a path to the ndk-build[.cmd] script file, that is, the path to the root folder of the NDK. The NDK environment variable can be used to help define the added path.
Now start gitBash and navigate to your ARToolKit5_ROOT directory.
cd android
./build.sh
if successful
./build_native_examples.sh
I've an error in ionic when I try to build android!
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting
setting it manually. Failed to find 'android' command in your 'PATH'.
Try update your 'PATH' to include path to valid SDK directory.
but:
➜ echo $ANDROID_HOME
/home/amaitre/android-sdk-linux
and the command android work:
http://hpics.li/b1c351a
Be careful if you sudo your ionic command !
Don't forget to add the path in your super user environment :)
Download Android SDK Tools from http://developer.android.com/sdk/installing/index.html?pkg=tools
Extract in: /home/{{user}}/build/
Insert below code at ~/.profile (caution: do not remove anything from there, just append this code)
//set PATH so it includes android SDK toold
if [ -d "$HOME/build" ] ; then
ANDROID_HOME=$HOME/build/android-sdk
PATH="ANDROID_HOME/tools:$PATH"
fi
Please let me know if this suggestion solved your problem.
i have already refer these links...
http://stackoverflow.com/questions/20241637/where-i-can-get-cordava-3-2-jar-file
http://cordova.apache.org/docs/en/3.2.0/guide_platforms_android_webview.md.html
This is my comand prompt o/p :
What should I do...
E:\Android Installation\cordova-3.2.0-src\cordova-3.2.0\cordova-android\framewor
k>android update project -p . -t android-18
'android' is not recognized as an internal or external command,
operable program or batch file.
It is because windows is unable to find the program android.bat or android.exe or whatever it is what you need to do is edit your PATH environmental variable and set it to the folder containing the file ,The file is probably at android-sdk/tools/ directory goto your android sdk installation directory/tools copy the path and in the command prompt typeset PATH="<the path you've just copied>"
I Want to build apk using commandline, I am using ant server by using it I am building apk with commandline but when I give this command ant debug it shows error BUILD FAILED Unable to locate tools.jar and then it gives error source resource doesnt exist
This might be because your JAVA_HOME is not set to your C:\Program Files\Java\jdk folder.
instead it might be set to C:\Program Files\Java\jre so it's not getting tools.jar.
just check out this.
You can do this in this way:
C:\>set JAVA_HOME=C:\Program Files\Java\jdk
C:\>ant debug
You need tools.jar file from your jdk/lib/ folder.
I have a kind of strange issue. In my bash script or Makefile, using aapt with absolute path does not work but if I am in the local directory it does.
If I do the following, it does not work:
aapt add $OUT/device.jar $OUT/classes.dex
The command does run and print this output:
'/homes/rsevile/CS307/bin/Device/classes.dex'...
But when trying to load the jar, the class that I am trying to load end up being not found.
The following does work though:
cd $OUT
aapt add device.jar classes.dex
Printing:
'classes.dex'...
This is the whole code being executed in the script (which works):
javac -d $(OUT)/classes -classpath ./layoutlib.jar src/com/device/client/*.java
jar cf $(OUT)/device.jar $(OUT)/classes $(OUT)/layoutlib
dx --dex --no-strict --output=$OUT/classes.dex $OUT/device.jar
cd $OUT
aapt add device.jar classes.dex
cd $ROOT
adb push $OUT/device.jar $ANDROID_OUT_DIR
I am confused why my class ends up being not found when using an absolute path with aapt.
Could anyone please explain to me why it is not working and how I could fix it to use a proper absolute path please?
Thank you.
I realized that aapt actually keeps the absolute path, there is no way around it.
I fixed the problem by reusing jar and using the -C option that lets me specify a directory.