Titanium: command not found on Ubuntu - android

I tried to install Titanium IDE (version 3.1.2.201308091617) to make some mobile apps on my ubuntu 12.04. I follow the guide, install successfully Android SDK and mobile SDK (3.1.2 and 3.0.0). I started a template project and just want to run on Android emulator or on web browser when I got this error: "Unable to locate the CLI executable. Please restart Studio or use Help > Check for Titanium Updates to install Titanium CLI."
On the web I found that I am supposed to have a titanium executable on my shell, but I didn't have it (command not found).I run something like $ find . -name "titanium" in my home directory but it doesn't return something executable. I only found titanium.py in my mobilesdk dir: /home/flagos/.titanium/mobilesdk/linux/3.1.2.GA/titanium.py
I try to add this directory into my $PATH, it doesn't change anything. I also tried to symlink titanium to titanium.py and add it into my $PATH but it leads to another error...
How do you get titanium executable on Ubuntu ? Where is it supposed to be ?
Thanks,

Related

Problems with zsh, flutter and android studio

I'm completely lost at this point. I turned on machine today and android studio couldn't recognize the device but vs code could, after spending hours finding solution. I reinstalled android studio and reset everything and now android studio recognizes the device but after clicking on run I see Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.
but running flutter doctor shows this
[✗] Android toolchain - develop for Android devices
✗ ANDROID_HOME =
/home/udaykhalsa/Android/Sdk:/home/udaykhalsa/Android/Sdk:/home/udaykhalsa
/Android/Sdk/platform-tools:/home/udaykhalsa/Programming-EnvironmentFiles/
flutter/bin:/home/udaykhalsa/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/
local/sbin:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/var/lib/flat
pak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendo
r_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
but Android SDK not found at this location.
.zshrc
export ZSH="/home/udaykhalsa/.oh-my-zsh"
export PATH="/home/udaykhalsa/Programming-EnvironmentFiles/flutter/bin":$PATH
export PATH="/home/udaykhalsa/Android/Sdk/platform-tools":$PATH
export PATH="/home/udaykhalsa/Android/Sdk":$PATH
export ANDROID_HOME="/home/udaykhalsa/Android/Sdk":$PATH
I'm not daring to make any changes to zshrc as I did a while back all the commands were not found. Any help appreciated.
Perform below, and did you observe the 'adb' file?
$ ls $ANDROID_HOME/platform-tools/adb
Am using macOS, my sdk is found inside 'Library' folder unlike yours. Should NOT be an issue if Android Studio is already working for you.
export ANDROID_HOME="/Users/someuser/Library/Android/sdk":$PATH
To see connected devices, issue either commands:
$ adb devices
$ flutter devices

Generation android app with ionic?

I'm following this tutorial to get started with Ionic Framework. I'm stuck in this part:
ionic platform add ios
when i execute it, Terminal shows me this error:
noting that hen i run echo $ANDROID_HOME it shows me /opt/android-sdk, the same thing when i execute sudo android it shows me SDK manager.
I have re-installed Android SDK, NODE, Ionic etc using the script on this page but i always get the same result.
What should i do?
PS: i'm running Ubuntu 14.04
set your path manually in .bash_profile.
export PATH=${PATH}:<your_android_sdk_location>/platform-tools
export PATH=${PATH}:<your_android_sdk_location>/tools
Well, the solution was the following, after executing the shell script fire up the SDK Manager and install this Android 4.4.2 API19 then run ionic CLI commands without sudo and you're done.

Cordova error while adding android in mac

I'm working on a macbook and developing with cordova. Now, I want to create an Android apk, but, when I type cordova platform add android I get this:
Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
Ok, this message should be very clear about what to do next, but don't know what to do. When I search I keep getting how to solve this in Windows and can't follow steps.
What (and how) should I do?
Thanks
EDIT:
I've already installed Android SDK when trying to compile apk.
More info:
As I couldn't install ANT, I uninstalled it: brew uninstall ant. But when brew install antagain I got:
$ brew install ant
==> Downloading http://www.apache.org/dyn/closer.cgi?path=ant/binaries/apache-ant-1.9.3-bin.tar.gz
==> Best Mirror http://apache.rediris.es/ant/binaries/apache-ant-1.9.3-bin.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "ant"
Download failed: http://apache.rediris.es/ant/binaries/apache-ant-1.9.3-bin.tar.gz
Some things to make sure you have completed before starting w/ Android:
Make sure ANT is installed:
Try ant --version, if command not found you need to install ANT.
The easiest way I have found is to use Homebrew. If you do not have homebrew installed, get it here
Once installed run
homebrew update
homebrew install ant
Unpack Android SDK:
Download and unpack the SDK package, place it in an easy to find location.
Then add the tools and platform-tools paths to your global PATH, like this:
vi ~/.bash_profile
add this line:
export PATH=/path/to/android/sdk/tools:/path/to/adnroid/sdk/platform-tools:$PATH
Exit the terminal and re open the terminal.
Now you should be able to run cordova platform add android in your project folder.

An error occured During creation of phonegap android sub project

I am trying to build a phonegap android,At that time i got a message that
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[error] An error occured during craetion of android sub-projesct. creating cordova project for the android platform
Please help me.
Thanks in advance.
Seems ant binary missing in your path!
In you install ant with npm like:
sudo npm install -g ant
Then just make symlink to bin folder what found in your $PATH like
sudo ln -s /usr/local/lib/node_modules/ant/ant/bin/ant /usr/local/bin/ant
There may be one of following two reasons-
1) .cordova directory already exists on your machine in your user folder. Delete it and try your command.
2)You have xcopy.exe somewhere on your machine. You should be able to add %SystemRoot%\System32 to your PATH.
or You can find it by running 'where xcopy' in your terminal window. XCOPY on the path is a requirement for setting up and installing Android
You need to define XCOPY on your path as it is used by the internal node.js scripts to move things around.
One of these should solve your problem.
I had same problem with cordova 3.3.1 and phonegap 3.3.0. Finally, I opened Android SDK manager and found out Platform tools were outdated, though I had the latest version from here. After update, this error was gone
Run the "android" command from your adt\sdk\tools folder and install the latest Tools and SDK. Also make sure your PATH has the right variables.
For this you will need ANT to be installed , a JAVA JDK and an Android SDK installed
JAVA_HOME (C:\Program Files\Java\jdk)
ANT_HOME ({ant location}\apache\apache-ant)
ANDROID_HOME ({android sdk location}\android-sdk)
Add these to your PATH variable like %ANT_HOME%/bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%JAVA_HOME%\bin
Close and re-open your cmd and run your command again.
Similiar to PhoneGap/Cordova Android Development

Cordova and setting Android using command line

I am trying to migrate my existing project from cordova 2.1 to the latest, 3.1 which can be installev vía command line,
I already have the Android SDK installed,
So:
sudo npm install -g cordova // All good
cordova create hello com.example.hello HelloWorld // All good
cordova platform add android // Then it fires:
Checking Android requirements...
[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. Output: ]
So I installed Macports and tried:
sudo port install android
Which logs:
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
---> Cleaning android
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
Any idea what am I missing here?
It's work cordova Android for MAC 1000000000%. I fought solution and now i'm working try this #Toni Michel Caubet. I will happy to share my Answer.
STEPS:
Open Your Terminal and followed by,
touch ~/.bash_profile
open ~/.bash_profile
PATH="/Users/System-Name/Documents/android-sdk-macosx/sdk/tools:/Development/android-sdk-macosx/sdk/platform-tools:$PATH" (This is Android SDK Location to stored in My system )
4.Save the file and quit the text editor.
5.Execute your .bash_profile to update your PATH:
source ~/.bash_profile
if you want to see your environment path:
7.In your terminal type: set
After you can see like
8.As far as your made it very correct. After your enter command like cordova platform add android. you get following error. because Java SDK doesn't too set environment PATH.
9.open ~/.bash_profile. Add JAVA_HOME value
10.You can see your environment like STEP 7 set. You should be able see:
11.Successfully created environment now you can create Android project with Cordova or PhoneGap
When you installed the Android SDK, it will come with a bunch of folders, like build-tools, platform-tools, tools, and some others. You need to add platform-tools and tools to your main $PATH environment variable.
See the docs here about how to add things to your PATH for whichever system you are on (Windows or Mac): http://cordova.apache.org/docs/en/3.1.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide
Here is how you would edit the $PATH on Windows:
Click on the Start menu in the lower-left corner of the desktop,
right-click on Computer, then click Properties.
Click Advanced System Settings in the column on the left.
In the resulting dialog box, press Environment Variables.
Select the PATH variable and press Edit.
Append the following to the PATH based on where you installed the
SDK, for example: ;C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools
Save and close both dialogs.
To install the cordova command-line tool, follow these steps:
First of all go through the Cordova Document
For Cordova command-line tools to work, you need to include the SDK's tools and platform-tools directories in your PATH environment. On Mac, you can use a text editor to create or modify the ~/.bash_profile file, adding a line such as the following, depending on where the SDK installs:
export PATH=${PATH}:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
Next Steps:
Download and install Node.js from Here. Following installation, you should be able to invoke node or npm on your command line.
Install the cordova utility. In Unix(Mac), prefixing the additional sudo command may be necessary to install development utilities in otherwise restricted directories:
For Mac $ sudo npm install -g cordova
once successful installation of cordova is done ,now you can create your application
across all the platforms.
Create the Cordova Application
Go to the directory where you maintain your source code, and run a command such as the following:
$cordova create hello com.example.hello CordovaDemo
hello is the directory where you want to create your application
com.example.hello is the package name
CordovaDemo is the name of the Application
Once Successful creation of your project, some file will be created inside the directory i.e hello
Add Platforms
All subsequent commands need to be run within the project's directory, or any subdirectories within its scope:
$ cd hello
Now you need to specify a set of target platforms, Supported OS for Mac
$ cordova platform add android
plz tell me if you are still having problem.
[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. Output: ]
You just need to install the Latest version of Android i.e 4.3
Go to SDK Manager and install the latest SDK Platform.
And try run the command again.
Hope this will help you.
Here it solved my issue:
into the terminal.
touch ~/.bash_profile (create a bash profile)
open ~/.bash_profile (opening a bash profile)
in your opened file, please type the following, Make sure that you have given the correct path, in case you find it difficult to find your directory in which your Android SDK is installed , search into your terminal with ls -l.
PATH="/Users/System-Name/Documents/android-sdk-macosx/sdk/tools:/Development/android-sdk-macosx/sdk/platform-tools:$PATH"
[Let me clarify first that, this is windows specific suggestion, answer]
For particular cordova version there corresponds particular android API
So,
First check out version of cordova with following command:
$ npm cordova -v
In my case cordova version was 1.4.28 , which corresponds to Android API 19
So the bottom line is don't waste time in downloading all "SDK Platforms"
instead just download corresponding Android API for concerned cordova version...
Hope this help....!!!

Categories

Resources