buiding android sdk - android

how to build sdk from source code

Have a look there.
To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.

The command for building the sdk is make sdk.

The steps to build the SDK are described in http://tools.android.com/build including the steps to build the Windows SDK (which is done under Linux.)

Related

Opening Android SDK manager on mac

Trying to open the android SDK manager on mac, but when I get to the terminal window and go to direct to tools like it says, I don't know what to do.
These are the instructions per the site
Mac/Linux: Open a terminal and navigate to the tools/ directory in the location where the Android SDK was installed, then execute android sdk.
And it's in my downloads. What do I need to type into the terminal to find it?
For manual SDK, AVD, and project management, please use Android Studio.
Google deprecated the android command.There is a temporary solution that you need to replace it with old one [There are changes in latest android sdk].Using an older version tools is basically a bad idea .
Seems like Google wants workflow to be managed using Android Studio. Perhaps the better solution is to use Android Studio
The SDK manager, as you said, is located in the tools directory of the Android SDK in its installed location. So as per your given information it should be like this:
~/Downloads/Android/sdk/tools/
The filename of the SDK manager is an executable named "android", so cd into the directory and run ./android and you should be good to go.
The "android" command is now deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
As Android Studio 3, the android command is deprecated. So, developers should use Android SDK which has been provided in Android Studio.
Tools > Android > SDK Manager
or for command-line usage,
- on MAC
~/Library/Android/sdk/tools/bin/
on Linux
/Path/To/SDK/tools/bin/
then run sdkmanager.

Cannot find a compatible Android SDK for compilation when running `tns platform add android`

I am following an official NativeScript tutorial and having a problem configuring my OS X environment for android development.
When running tns platform add android I receive the following error:
Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 21 or later.
The tns doctor command also returns warnings on android-sdk issues:
Cannot find a compatible Android SDK for compilation. To be able to
build for Android, install Android SDK 21 or later. Run $ android to
manage your Android SDK versions. You need to have the Android SDK
Build-tools installed on your system. You have to install version 22.
Run "android" from your command-line to install required Android Build
Tools. You need to have the latest Android Support Repository
installed on your system. Run $ android to manage the Android
Support Repository.
My android-sdk installation looks like this:
My .bash_profile also includes the followings:
export ANDROID_HOME="/usr/local/Cellar/android-sdk/24.3.4/"
export PATH="$PATH:~/npm-global/bin:/usr/local/Cellar/android-sdk/24.3.4/tools:/usr/local/Cellar/android-sdk/24.3.4/platform-tools"
Should I go further and try setting system-wide environment variables - not just for the .bash_profile? Also, it is possible that I missed something from the setup process...
Any tip on how I could debug this situation (commands, config files etc.) would be great, thank you!
Alright, so you need to make sure of following:
Make sure you have API 22 installed.
Make sure you you have Android SDK Build Tools 22.x.x installed. (Yes,
specifically 22.x.x)
Make sure you have Android support repository installed. (You can
find it under Extras section in Android SDK Manager)
Once you have performed steps mentioned above, run tns doctor again and you should see No issues were detected message.
This is because of sudo. The root user has no ANDROID_HOME set.
For Windows User:
Run 'android update sdk' from command line
Select Android 5.1.1(API22)
Select Tools folder
Select Extras and click on Install.
ps:- adding this answer, so that if any one land on this page can see it.
Check the ANDROID_HOME is ok
Install the API 22 + ion the Extras > Android Support Repository
Run the following
tns platform remove android
tns platform add android#next
Run
tns run android
then it should be OK
I solve this problem installing Android Support Repository from Extras.
updating SDK in AndroidStudio >> Preferenceswould help
on my windows 10 machine I had to open file explorer right click on this pc and go to properties on the left hand side I had to go to advanced settings. At the bottom I click environment variables then on the android_home variable I clicked edit then pointed it to this path on my machine where the sdk was installed
C:\Program Files (x86)\Android\android-sdk
This answer is on a Linux, not OSX, platform. However, since this is the SO that appears most often for the listed error, I'll share a recent fix that worked for me.
If you have done all of the above and are still getting the error, try this solution.
I am using NativeScript 8.0.2.
You will know that ANDROID_HOME and Java are configured correctly if you can run the command $ANDROID_HOME/tools/bin/sdkmanager --list. If that fails, then first check that your Java is compatible (I had to add OpenJDK 8 and change my PATH with export JAVA_HOME="/usr/lib64/jvm/java-1.8.0/")
In Android Studio, add a previous build tool version. Go to your SDK Manager > SDK Tools, tick the bottom box "Show package details", and add a previous version. In my case, 31.0.0 was the latest, and I added 30.0.3. Now run ns doctor android again and everything should pass.
Seems 31.0.0 is not yet properly recognised by Native Script.
I always got the error "✖ Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later. "
I actually had to go to the android studio settings and install the exact SDK 28 before this error went away.
Android Settings Pic
This is an updated answer, I also had the same issue:
Like all the previous pictures above, I had to install the SDK platforms, using the SDK Manager. From the main screen of Android Studio, click More Actions and choose SDK Manager. Before that I had to add the platform-tools to my PATH in Windows
%LOCALAPPDATA%\Android\Sdk\platform-tools
That fixed my issue and the docs for setup are here.

Installing Titanium Studio on Windows 7 64bit machine

Can anybody please share any step by step guide to install and configure Titanium Studio (which version should I use ?) on a Windows 7 64 bit machine for Android development ?
I am trying the latest version but it seems not working. Can't set the andorid sdk path.
I have JDK 1.7 64 bit installed in my machine. I think 32 bit 1.6 is required but it was suppose to be managed by the installer ?
I found a step by step guide with pictures in the documentation. I assume this is what you're looking for? http://docs.appcelerator.com/titanium/3.0/#!/guide/Setting_up_Studio
Check below links :
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f07d923c-a281-3010-72bd-b7bb9dcd3ae2?overridelayout=true
http://www.appliedclub.org/blog/2013/02/12/installing-titanium-appcelerator-on-windows/
http://docs.appcelerator.com/titanium/3.0/#!/guide/Setting_up_Studio
http://docs.appcelerator.com/titanium/3.0/#!/guide/Setting_up_the_Titanium_CLI
Steps you need to follow :
Downloading and Installing Titanium Studio
Launching Titanium Studio
Configuring Titanium Studio
Add path of default Android SDK
Creating a project in Titanium Studio.
Hope this helps.
Please use the documentation itself. The documentation specifically says that you need to use 32 bit java v1.6 regardless of your system configuration, you need to manually install 32 bit java, set the environment variables.
You may also refer
Failed to Load JNI Shared Library When Trying to Use Titanium
how to install sdk Android with titanium
Titanium 3.1.0 - Emulator process exited with code 1 - Can't compile APK
Hope it helped you. Let me know if you have any queries

How to determine the version of android SDK installed in computer?

How to determine the version of Android SDK installed in my computer?
<Program files>\Android\Android-sdk\platforms\<platform SDK's>
On a 32bit machine:
"<Program files>" will be \Program Files\
On a 64bit machine:
If you installed the 32bit ADT, "<Program files>" will be \Program Files (x86)\
If you installed the 64bit ADT, "<Program files>" will be \Program Files\
Type in android list target into your command line to see what android API you are using.
C:\ <path to android sdk> \tools\source.properties (open with notepad)
There you will find it.
Android Studio is now (early 2015) out of beta. If you're using it as your development platform, the SDK Manager is probably the easiest way to see what's available. To start the SDK Manager from within Android Studio, use the menu bar: Tools > Android > SDK Manager.
This will provide not only the SDK version, but the versions of SDK Build Tools and SDK Platform Tools. It also works if you've installed them somewhere other than in Program Files.
You can check following path for Windows 10
C:\Users{user-name}\AppData\Local\Android\sdk\platforms
Also, you can check from android studio
File > Project Structure > SDK Location > Android SDK Location
open android sdk->click on tools tab->about and u get the entire details!
In the case of Linux, You get the version of Android SDK using sdkmanager.
your_path/android-sdk/tools/bin/sdkmanager --version
in my case
/var/lib/jenkins/android-sdk/tools/bin/sdkmanager --version
While some responses have shown how to get the versions of the installed Android SDKs and various Android SDK related tools using the Android SDK Manager GUI, here's a way to get the same information from the command line:
%ANDROID_HOME%\tools\bin\sdkmanager.bat --list
You can redirect the output to a file to ease review and sharing.
Note: In my corporate environment, I also had to use the --proxy, --proxy_host, and --proxy_port command line options. You may need to use them as well.
I develope cross-plateform mobile applications Using Xamarin integrated in Visual Studio 2017.
I prefer to install and check all details of Android SDK from within the Visual Studio 2017. This can be found under the menu TOOLS -> Android -> Android SDK Manager.
Bellow is the Visual representation of the Adroid SDK Manager.
If you prefer to manage from UI, type android in command windows which will open the Android SDK Manager. Or you can directly open from C:\Program Files (x86)\Android\android-sdk\SDK Manager.exe
Create a Batch file (.bat) in Windows with the following command in it:
%ANDROID_HOME%\tools\bin\sdkmanager.bat --list && pause
NOTE: Using && pause is necessary to be able to review the information, once it is listed. If not used, the batch file will simply run, show the information in just mere few seconds and exit right away.

After downloading NDK r8 whether I need to download more or not?

I have downloaded android-ndk-r8b.zip(180MB),but I want to know if I need to download anything else?
I am using the NDK because I want to use C/C++ native code (used in tesseract3.0 project) in my android library.
I am using Eclipse IDE(Indigo).
I also installed the following
installed CDT from Eclipse update site http://download.eclipse.org/tools/cdt/releases/indigo.
installed Android SDK + NDK Plugins from Eclipse update site https://dl-ssl.google.com/android/eclipse/
If you want to code under Indigo you do not need anything else, however i found Eclipse to be an horrible IDE for C and C++ and i suggest to code with just a text editor and a terminal because it's just more flexible and reliable.
To develop in android using eclipse you need: Android-SDK, Android-NDK and eclipse plugin.
If you use windows you also need to install cygwin version 1.7 or greater.
You need gnu Make 3.81 or later and a recent gawk (include them during cygwin installation).
See http://developer.android.com/tools/help/adt.html for the detailed explanations. In addition to eclipse and SDK, you should install ADT Plugin. Form version 20, the plugin supports native development, in addition to java.

Categories

Resources