Cannot update the project in android ndk - android

I'm using linux and i have successfully installed ndk and configured it. with the help of Android NDK installation But i can't able to generate build.xml file
root#ndot-173:~/Desktop/NDK4/samples/bitmap-plasma# android update project -p . -s
android: command not found
It shows command not found.
How do i generate build.xml file..?

you have to add android sdk in you PATH or
you use the absolute path of the android command ex: you_android_sdk_path/tools/android

Related

There are not available platforms

Im using cocos2d-x version 12 and NDKrc12 and I have all the paths in my
.bash_profile set. But when I build for android and type:
cocos compile -p android
It displays a message "There are not available platforms" which can't be because I have the android SDK installed in the correct path what is wrong?
On the latest version of cocos2d-x for some odd reason you need to use the '-s' option like this:
cocos run -s /Users/me/myprojects/mygame -p android
Otherwise without '-s' it displays "there are not available platforms"
seems unnecessary when your in your project folder but I guess it is!
Run android on the command line, this will open the Android SDK manager. From here make sure that you have installed the appropriate SDK for your device.
cd your project root, then open .cocos_project.json, find "android_cfg" arg, if you have the folder. if you don't find, then create a new cocos project, cocos compile, then judge which platform can run, in new project folder open .cocos_project.json. You can look for diffences between them.

Installing Tesseract for android

Can someone guide me through the process of installing Tesseract OCR engine to use with Eclipse for android development. I have tried a few tutorials but they always lose me at some point. the last thing I tried was trying to download the repository for Tesseract available on github but when following the instructions (after having downloaded the NDK) and following this commands in the command line
`git clone git://github.com/rmtheis/tess-two tess
cd tess
cd tess-two
ndk-build***
android update project --path .
ant release`
when I get to ndk-build it doesnt recognize it as a command. also I have no idea what ant release is or does or if I need to install some software to use it.
Add the ndk folder to your PATH variable. If you are on windows, add the ndk-build path(../android-ndk-r10) to your environment variable PATH. If you are using MAC or linux set/export your PATH variable to include the path to your ndk folder.
Also set ANDROID_NDK_ROOT to point to the ndk folder. This will resolve the ndk-build command not recognized issue.
ant release - is to build your android project for release. This will building your final apk file that goes into play store.
ant debug - is to build the debug build of your application.
Set the JAVA_HOME variable to point to the JDK installation folder for ant to work properly.
set JAVA_HOME=c:\Progra~1\Java\<jdkdir>

Can't find cordova.jar file in phonegap?

I am new to phonegap the tutorials I have referred to says that there should be a cordova.jar file inside the phonegap-2.9.1\lib\android path. But I don't have it in this phonegap 2.9.1 version.
Can I download the cordova.jar from anywhere or is there any alternative?
Someone please help me.
Thanks.
First, you need the following requisites, for sure are covered if you have been playing with phonegap/cordova for a while ;)
Java JDK 1.5 or greater
Apache ANT 1.8.0 or greater
Android SDK http://developer.android.com
And then, to generate the cordova-2.9.1.jar file, follow the next steps:
Download and extract the phonegap-2.9.1.zip file.
In a terminal/cmd window go inside the recently extracted directory:
$ cd phonegap-2.9.1\lib\android\framework\
Execute the following commands (you need android sdk and ant already configured in your system path):
$ android update project -p . -t android-17
If required add the --subprojects parameter:
$ android update project -p . -t android-17 --subprojects
You get a message like this:
Updated project.properties
Updated local.properties
build.xml: Found version-tag: custom. File will not be updated.
Updated file D:\work_NEW\phonegap-2.9.1\lib\android\framework\proguard-project.txt
Updated and renamed default.properties to project.properties
Updated local.properties
No project name specified, using Activity name 'DroidGap'.
If you wish to change it, edit the first line of build.xml.
Added file D:\work_NEW\phonegap-2.9.1\lib\android\framework\bin\build.xml
Added file D:\work_NEW\phonegap-2.9.1\lib\android\framework\bin\proguard-project.txt
Finally run:
$ ant jar
Blablabla....
jar:
[jar] Building jar: xxx\phonegap-2.9.1\lib\android\framework\ cordova-2.9.1.jar
BUILD SUCCESSFUL
Total time: 4 seconds
Done!!!!! The file is ready! And you can find this and other information reading a file inside the phonegap-2.9.1.zip:
phonegap-2.9.1\lib\android\README.md
Since 3.x version phonegap has changed a lot. I suggest you to install 3.3 version and create a proyect following the steps described in the offical page.
Also, you can download cordova from cordova web page, add to path, and create a proyect using terminal:
cordova create app_name
cordova platform add android || cordova build android
In 3.3.0 version, You can get cordova-3.3.0.jar file by following these steps:
Go to Command Prompt:
$ cd %HOMEPATH%/.cordova/lib/android/cordova/3.3.0/framework
$ android update project -p
$ ant jar
After executing these commands you will get cordova-3.3.0.jar in framework folder i.e.
=> %HOMEPATH%/.cordova/lib/android/cordova/3.3.0/framework/cordova-3.3.0.jar

Can't add android platform to phonegap project

I'm trying to add the android platform to my phonegap project. I've added already the iOS platform which worked without any problems. When trying to add android via command
phonegap local run android
I'm always getting this error:
[error] The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added to your path.
I have already downloaded the latest Android SDK and I set a PATH to the tools and platform-tools folder as well.
export PATH=${PATH}:/Documents/android/sdk/platform-tools:/Documents/android/sdk/tools
I also updated my bash_profile file properly with
source ~/.bash_profile
It turned out that the path to the Android SDK have to be absolute path. After changing my path to something like
export PATH=${PATH}:/Users/your-username/Documents/android/sdk/platform-tools:/Users/your-username/Documents/android/sdk/tools
I could now successfully add the android platform to my project.

How to add Ruboto path to android sdk?

I am new to Ruboto gem. I am currently working on android with Ruboto. I know android. I have installed the all requirements for Rubuto. I try to created the sample project using following command,
$ ruboto gen app --package org.sample.rubotoapp --target android-17
Output: Android SDK not in path
/bin/sh: android: not found
Please anybody can solve my problem. Thanks....
It looks like the Android SDK tools directory is not in your path. If you check you path variable with
echo $PATH
it will probably not contain the Android SDK tools directory. Also, you can check if the "android" command is in your path using
which android
You will probably get an empty response.
If you use Ruboto 0.12.0, you should be able to use
ruboto setup
to configure your environment. Recently, in Android SDK r22, the path to the build tools was changed. This will break your setup, and you will have to add
<android sdk location>/build-tools/17.0.0
to your path manually. This is fixed for Ruboto 0.13.0 which will be released in june.

Categories

Resources