Mac Os X Android Sdk Location



-->

Jul 26, 2019 If you are not able to build using Visual Studio for Mac because Android SDK, NDK and JDK seems to be missing, you will need to configure your preferences settings. Configure your 'preferences' setting in Visual Studio for Mac (Or Xamarin Studio) Navigate to 'Preferences' and select the 'Locations' tab before copying in the location addresses. Nov 08, 2014 Note: I am using android studio for this tutorial. First, fire up your android studio (in yosemite you can do so by command + space and type in android studio). And then create a new Project; Here’s the most important part. Click on File - Other Settings - Default Project Structure. There’s your android sdk. Xcode 3.1 was an update release of the developer tools for Mac OS X, and was the same version included with the iPhone SDK. It could target non-Mac OS X platforms, including iPhone OS 2.0. It included the GCC 4.2 and LLVM GCC 4.2 compilers. Another new feature since Xcode 3.0 is that Xcode's SCM support now includes Subversion 1.5. Mac OS X Platform OneSignal does not currently have a dedicated macOS SDK; however, OneSignal can be used to send notifications to macOS apps. Please refer to Apple's documentation to learn how to obtain a push token.

In Visual Studio, navigate to Tools > Options > Xamarin > AndroidSettings to view and set the Android SDK location:

Sdk

The default location for each path is as follows:

  • Java Development Kit Location:

    C:Program FilesJavajdk1.8.0_131

  • Android SDK Location:

    C:Program Files (x86)Androidandroid-sdk

  • Android NDK Location:

    C:ProgramDataMicrosoftAndroidNDK64android-ndk-r13b

Note that the version number of the NDK may vary. For example, insteadof android-ndk-r13b, it could be an earlier version such asandroid-ndk-r10e.

To set the Android SDK location, enter the full path of the Android SDKdirectory into the Android SDK Location box. You can navigate tothe Android SDK location in File Explorer, copy the path from theaddress bar, and paste this path into the Android SDK Location box.For example, if your Android SDK location is atC:UsersusernameAppDataLocalAndroidSdk, clear the oldpath in the Android SDK Location box, paste in this path, and clickOK.

In Visual Studio for Mac, navigate to Preferences > Projects > SDKLocations > Android. In the Android page, click the Locationstab to view and set the SDK location:

The default location for each path is as follows:

Mac Os X Android Sdk Location
  • Android SDK Location:

    ~/Library/Developer/Xamarin/android-sdk-macosx

  • Android NDK Location:

    ~/Library/Developer/Xamarin/android-ndk/android-ndk-r14b

  • Java SDK (JDK) Location:

    /usr

Note that the version number of the NDK may vary. For example, insteadof android-ndk-r14b, it could be an earlier version such asandroid-ndk-r10e.

Mac Os X Android Sdk Location Settings

To set the Android SDK location, enter the full path of the AndroidSDK directory into the Android SDK Location box. You can select theAndroid SDK folder in the Finder, press CTRL+⌘+I to viewfolder info, click and drag the path to the right of Where:, copy,then paste it to the Android SDK Location box in theLocations tab. For example, if your Android SDK location is at~/Library/Developer/Android/Sdk, clear the old path inthe Android SDK Location box, paste in this path, and click OK.

I’ve got at least two concepts for Android apps running around in my head, notebooks & text files at the moment. Being a web developer for some years now, and having developed a Windows app or two, I figured I would be able to start prototyping these concepts for Android without too much hassle.

So far, the hardest and most frustrating part of this process has been installing the SDK. Part of the hassle I’ve had is that most online resources only explain the steps required for users of Eclipse (which automates a bit of it for you). The most frustrating bit was forum answers which simply told you to install Eclipse to fix whatever code-related problem the asker was having.

I want to avoid Eclipse, for two main reasons:

  1. Eclipse is nasty to use, convoluted resource-hog. It’s slower than a wet week on my Mac, plus it hasn’t functioned as it should when I’ve attempted to use it in the past (and man, that interface is yuck).
  2. See reason 1.

The other hassles I’ve had is with the lack of accurate documentation. The resources I’ve been reading have overlooked some vital steps in the process of installing the SDK and getting your first app up and running.

I’m going to explain the steps I took to install the latest version of the Android SDK on my Mac OS X 10.7, plus the extra steps needed to get my first app working. These instructions are based on the official developer.android.com instructions on “Building Your First App“, but instead of any IDE I’ll be using the command line and TextWrangler.

The first step is to download the SDK. I opted to download the non-bundle version (under the heading “Use an existing IDE”). Open this and extract it. I chose to locate it in the directory /Android/ (in the root of my main hard drive). I will be referring to this path from now on. If you want to save it elsewhere, please translate that path in your head.

Next, go to /Android/tools/ and run the android file. It will open up a Terminal window, and then launch a GUI. This is the Android SDK Manager, and it is how you obtain the latest copy of the SDK, as well as extra tools and libraries you may need. I opted to download the entire “Tools” folder, the entire folder of the latest SDK (Android 4.2 – SDK 17), and the Android Support Library (under “Extras”).

The next step is to install Apache ANT. ANT is used to automate the build process, and is necessary for most users. You could build manually, but the ANT tool will save you a lot of time. This step was left out of the guides I read, and caused some confusion when it came time to build. Zte maven 3 manual. Download the binary, and extract it. I then created the folder /Android/ant/ and copied the entire bin and lib folders into there.

Mac Os X Android Sdk Location

The next step is to add ANT’s bin folder to PATH. This is a system-wide variable used by the operating system to allow you to directly open the contents of a folder without needing to specify it’s full folder path. As an example, I could type /Android/ant/bin/ant into the command line, or I could just type ant – they both do the same thing.

On Mac OS X, you add a folder to the PATH variable by running this command in Terminal:

Usi 5204

  • PATH=$PATH:/Android/ant/

The manual also says you should add the environmental variable ANT_HOME and set it to the main ANT folder (/Android/ant/), but I didn’t do this and haven’t had any issues yet.

Check you’ve installed it correctly by typing ant into Terminal and looking for this output: “Buildfile: build.xml does not exist! Build failed”

You also need to add the /Android/platform-tools/ and /Android/tools/ folders to the path variable. Execute these commands one at a time:

  • PATH=$PATH:/Android/platform-tools/
  • PATH=$PATH:/Android/tools/

You are now ready to create, build, and run a bare bones app. The official instructions are fine here, so read the pages “Creating an Android Project“, “Running and Application“, and “Building a Simple User Interface“.

Tip about emulators: If your computer isn’t loaded up with a whole heap of CPU power, try create a virtual Android device with a smaller resolution and DPI. I’m running a 5.1″ WVGA 480 x 800 device on my several year old MacBook just fine, where as the higher res and DPI devices would take a long, long time to load and sometimes crash.

Mac Android Sdk Download

Tip about Reinstalling: The process where you install an app into the emulator doesn’t like it if you already have an older copy of that app installed. I have been manually deleting it each time by holding down the mouse on the icon and dragging it towards the “Uninstall” icon which appears. There is probably a way to automate this, but I haven’t found it yet.

The last page where you create another Activity lacks a few instructions. You need to manually add some imports to the top of your Java files before they will compile. These are listed in the instructions, except for one: import android.support.v4.app.NavUtils;

This last one tripped me up a bit, as I hadn’t installed the Android Support Library at the start. As you did, you shouldn’t have issues with this triggering a compile error.

By now you should have be able to run your app in the emulator and create a new view. For me, this whole process was incredibly painful and took well over an hour to figure out. Writing it all down, it does seem a lot easier than it felt at the time, but I suppose hindsight is 20/20. With any luck, my publication of these tips has helped you.

Macos Android Sdk Location

Also, stay tuned for information about our upcoming Android products.