{"id":8306,"date":"2020-01-07T14:53:56","date_gmt":"2020-01-07T14:53:56","guid":{"rendered":"https:\/\/www.scichart.com\/?post_type=blog_scichart&p=8306"},"modified":"2023-12-26T15:11:35","modified_gmt":"2023-12-26T15:11:35","slug":"setting-up-an-android-development-environment-on-osx","status":"publish","type":"blog_scichart","link":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/","title":{"rendered":"Setting up an Android Development Environment on OSX"},"content":{"rendered":"
\n

The following guide will help you setup a\u00a0Development Environment for Android on Mac OSX.<\/strong> This is required if you wish to compile SciChart’s Android Charts<\/a> or Chart Examples \/ Demos<\/a> from source-code. You can skip this if you already have Android Studio and the Android NDK setup!<\/em><\/p><\/blockquote>\n

Installing the Java Development Kit<\/h2>\n

1.\u00a0Using safari, navigate to\u00a0https:\/\/www.java.com\/en\/download\/<\/a>\u00a0and download Java 8 for mac.<\/p>\n

2.\u00a0You will also need to install the Java Platform JDK from\u00a0http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html<\/a><\/p>\n

\n

NOTE<\/i><\/b>: Make a note of your JDK Install path. For instance, \/Library\/Java\/JavaVirtualMachines\/jdk1.8.0_45.jdk\/Contents\/Home. This will be required later when setting environment variables<\/i><\/p><\/blockquote>\n

Installing Android Studio<\/h2>\n

Download Android Studio for MAC from the\u00a0https:\/\/developer.android.com\/studio\/index.html#downloads<\/a>. Follow the steps to install the application in OSX.<\/p>\n

\"\"<\/p>\n

You can start the application from the Applications folder, or from Spotlight, by searching CMD+SPACE and typing \u2018Android Studio\u2019<\/p>\n

\"\"<\/p>\n

On first start, Android Studio will try to download the Android SDK. This may take a while. Make a note of where the Android SDK was installed to, this is very useful for certain operations in Android!<\/p>\n

\"\"<\/p>\n

Once that\u2019s done, open Android Studio and go to Tools -> Android -> SDK Manager. Under SDK Platforms ensure you have selected the platform(s) you want to develop for. For instance, we require v4.4 \u2013 v6 for SciChart Android development.<\/p>\n

\"\"<\/p>\n

Next, under SDK Tools ensure \u2018Android SDK Build Tools\u2019 is up to date. Also download the Android NDK v12.<\/p>\n

\"\"<\/p>\n

Click OK to install all components.<\/p>\n

Installing the Android NDK<\/h2>\n

Certain components in SciChart’s Android Chart Library<\/a> are dependent on the Android NDK (Native Development Kit). Installing this is required if you are building our examples or SciChart Android library from source-code<\/b>.<\/p>\n

The Android NDK can be downloaded via the SDK Manager within Android Studio. Go to Tools -> Android -> SDK Manager. Under Build tools ensure the Android NDK is checked and up to date.<\/p>\n

Installing Gradle<\/h2>\n

Gradle is the command-line build tool for Java and Android applications. SciChart uses Gradle to build libraries (AARs, which contain JAR and resource files) which can be used in your own applications.<\/p>\n

If you are compiling SciChart Android from our source code, it is recommended you install Gradle. Following the instructions from StackOverflow at\u00a0http:\/\/stackoverflow.com\/a\/28928107\/303612<\/a><\/p>\n

1. Install Homebrew (a package manager for OSX)<\/p>\n

\/bin\/bash -c "$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)"\n<\/code><\/pre>\n

2. Install Gradlebrew install gradle<\/p>\n

brew install gradle<\/code><\/pre>\n

Setting Mac OSX Environment Variables<\/h2>\n

The following environment variables must be set to allow development of SciChart Android in Android Studio on OSX.<\/p>\n

    \n
  • JAVA_HOME: The location of the Java JDK<\/li>\n
  • ANDROID_HOME: The location of the Android SDK on disk<\/li>\n
  • ANDROID_NDK_HOME: The location of the Android NDK on disk<\/li>\n<\/ul>\n

    To set environment variables so that they may be read by OSX Applications, you will need to follow these steps.<\/p>\n

    1. Press CMD+Space to open Spotlight and search for Apple Script Editor.<\/p>\n

    2. Open Apple Script Editor<\/p>\n

    3. Type into Apple Script the following commands to set environment variables:<\/p>\n

    do shell script\u00a0"launchctl setenv JAVA_HOME \/Library\/Java\/JavaVirtualMachines\/jdk1.8.0_45.jdk\/Contents\/Home"\ndo shell script\u00a0"launchctl setenv ANDROID_HOME \/users\/$(whoami)\/Library\/Android\/sdk"\ndo shell script\u00a0"launchctl setenv ANDROID_NDK_HOME \/users\/$(whoami)\/Library\/Android\/sdk\/ndk-bundle"<\/code><\/pre>\n

    4. Save the file with\u00a0File<\/b>\u00a0Format<\/b>\u00a0Application<\/b>\u00a0in your Documents\/ folder and name it EnvironmentVars.<\/p>\n

    \"\"<\/p>\n

    \u00a05. Next, in Spotlight, search for System Preferences -> open Users and Groups.<\/p>\n<\/div>\n

    \"\"<\/p>\n

    6.\u00a0Under your username, click Login Items.<\/p>\n

    7.\u00a0Add the EnvironmentVars script to the login items, so that this script is opened every time you login.<\/p>\n<\/div>\n

    \"\"<\/p>\n

    8.\u00a0Finally, log out and log back in to your mac.<\/p>\n

    9.\u00a0After logging in, wait a moment for the script to run (it can take 10 seconds after startup). Then, you can verify that all environment variables have been set correctly by opening a new Terminal window and typing<\/p>\n

    a. echo \u201c$ANDROID_HOME\u201d\nb. echo \u201c$ANDROID_NDK_HOME\u201d\nc. echo \u201c$JAVA_HOME\u201d<\/code><\/pre>\n

    These should resolve to the correct directories where the Android SDK, NDK and JDK are installed respectively.<\/p>\n

    \"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

    The following guide will help you setup a\u00a0Development Environment for Android on Mac OSX. This is required if you wish […]<\/p>\n","protected":false},"author":37,"featured_media":8308,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","blog_scichart_tag":[25],"acf":[],"yoast_head":"\nSetting up an Android Development Environment on OSX - SciChart<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting up an Android Development Environment on OSX - SciChart\" \/>\n<meta property=\"og:description\" content=\"The following guide will help you setup a\u00a0Development Environment for Android on Mac OSX. This is required if you wish […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/\" \/>\n<meta property=\"og:site_name\" content=\"SciChart\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/scichart\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-26T15:11:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"602\" \/>\n\t<meta property=\"og:image:height\" content=\"340\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@scichart\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/\"},\"author\":{\"name\":\"Andrew Burnett-Thompson\",\"@id\":\"https:\/\/www.scichart.com\/#\/schema\/person\/903b030934442297fd094f66159ea0d2\"},\"headline\":\"Setting up an Android Development Environment on OSX\",\"datePublished\":\"2020-01-07T14:53:56+00:00\",\"dateModified\":\"2023-12-26T15:11:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/\"},\"wordCount\":633,\"publisher\":{\"@id\":\"https:\/\/www.scichart.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg\",\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/\",\"url\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/\",\"name\":\"Setting up an Android Development Environment on OSX - SciChart\",\"isPartOf\":{\"@id\":\"https:\/\/www.scichart.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg\",\"datePublished\":\"2020-01-07T14:53:56+00:00\",\"dateModified\":\"2023-12-26T15:11:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage\",\"url\":\"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg\",\"contentUrl\":\"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg\",\"width\":602,\"height\":340,\"caption\":\"Android studio install\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.scichart.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blogs\",\"item\":\"https:\/\/www.scichart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Setting up an Android Development Environment on OSX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.scichart.com\/#website\",\"url\":\"https:\/\/www.scichart.com\/\",\"name\":\"SciChart\",\"description\":\"WPF Charts, iOS Charts, Android Charts, JavaScript Chart\",\"publisher\":{\"@id\":\"https:\/\/www.scichart.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.scichart.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.scichart.com\/#organization\",\"name\":\"SciChart\",\"url\":\"https:\/\/www.scichart.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.scichart.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.scichart.com\/wp-content\/uploads\/2022\/11\/scichart-logo-1.png\",\"contentUrl\":\"https:\/\/www.scichart.com\/wp-content\/uploads\/2022\/11\/scichart-logo-1.png\",\"width\":312,\"height\":69,\"caption\":\"SciChart\"},\"image\":{\"@id\":\"https:\/\/www.scichart.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/scichart\",\"https:\/\/x.com\/scichart\",\"https:\/\/www.youtube.com\/scichart\",\"https:\/\/www.linkedin.com\/company\/scichart\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.scichart.com\/#\/schema\/person\/903b030934442297fd094f66159ea0d2\",\"name\":\"Andrew Burnett-Thompson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.scichart.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b376d1a4c69e640acb874ff01952a48e?s=96&d=https%3A%2F%2Fwww.scichart.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fdefault-avatar.jpg&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b376d1a4c69e640acb874ff01952a48e?s=96&d=https%3A%2F%2Fwww.scichart.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fdefault-avatar.jpg&r=g\",\"caption\":\"Andrew Burnett-Thompson\"},\"description\":\"CEO \/ Founder of SciChart. Masters (MEng) and PhD in Electronics & Signal Processing. Follow me on LinkedIn for more SciChart content, or twitter at @drandrewbt.\",\"sameAs\":[\"https:\/\/www.scichart.com\",\"https:\/\/www.linkedin.com\/in\/dr-andrew-burnett-thompson\/\",\"https:\/\/x.com\/drandrewbt\"],\"url\":\"https:\/\/www.scichart.com\/author\/andrew\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting up an Android Development Environment on OSX - SciChart","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/","og_locale":"en_GB","og_type":"article","og_title":"Setting up an Android Development Environment on OSX - SciChart","og_description":"The following guide will help you setup a\u00a0Development Environment for Android on Mac OSX. This is required if you wish […]","og_url":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/","og_site_name":"SciChart","article_publisher":"https:\/\/www.facebook.com\/scichart","article_modified_time":"2023-12-26T15:11:35+00:00","og_image":[{"width":602,"height":340,"url":"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@scichart","twitter_misc":{"Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#article","isPartOf":{"@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/"},"author":{"name":"Andrew Burnett-Thompson","@id":"https:\/\/www.scichart.com\/#\/schema\/person\/903b030934442297fd094f66159ea0d2"},"headline":"Setting up an Android Development Environment on OSX","datePublished":"2020-01-07T14:53:56+00:00","dateModified":"2023-12-26T15:11:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/"},"wordCount":633,"publisher":{"@id":"https:\/\/www.scichart.com\/#organization"},"image":{"@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg","inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/","url":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/","name":"Setting up an Android Development Environment on OSX - SciChart","isPartOf":{"@id":"https:\/\/www.scichart.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage"},"image":{"@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg","datePublished":"2020-01-07T14:53:56+00:00","dateModified":"2023-12-26T15:11:35+00:00","breadcrumb":{"@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#primaryimage","url":"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg","contentUrl":"https:\/\/www.scichart.com\/wp-content\/uploads\/2020\/01\/android-studio-install.jpg","width":602,"height":340,"caption":"Android studio install"},{"@type":"BreadcrumbList","@id":"https:\/\/www.scichart.com\/blog\/setting-up-an-android-development-environment-on-osx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scichart.com\/"},{"@type":"ListItem","position":2,"name":"Blogs","item":"https:\/\/www.scichart.com\/blog\/"},{"@type":"ListItem","position":3,"name":"Setting up an Android Development Environment on OSX"}]},{"@type":"WebSite","@id":"https:\/\/www.scichart.com\/#website","url":"https:\/\/www.scichart.com\/","name":"SciChart","description":"WPF Charts, iOS Charts, Android Charts, JavaScript Chart","publisher":{"@id":"https:\/\/www.scichart.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scichart.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.scichart.com\/#organization","name":"SciChart","url":"https:\/\/www.scichart.com\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.scichart.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.scichart.com\/wp-content\/uploads\/2022\/11\/scichart-logo-1.png","contentUrl":"https:\/\/www.scichart.com\/wp-content\/uploads\/2022\/11\/scichart-logo-1.png","width":312,"height":69,"caption":"SciChart"},"image":{"@id":"https:\/\/www.scichart.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/scichart","https:\/\/x.com\/scichart","https:\/\/www.youtube.com\/scichart","https:\/\/www.linkedin.com\/company\/scichart"]},{"@type":"Person","@id":"https:\/\/www.scichart.com\/#\/schema\/person\/903b030934442297fd094f66159ea0d2","name":"Andrew Burnett-Thompson","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.scichart.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b376d1a4c69e640acb874ff01952a48e?s=96&d=https%3A%2F%2Fwww.scichart.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fdefault-avatar.jpg&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b376d1a4c69e640acb874ff01952a48e?s=96&d=https%3A%2F%2Fwww.scichart.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fdefault-avatar.jpg&r=g","caption":"Andrew Burnett-Thompson"},"description":"CEO \/ Founder of SciChart. Masters (MEng) and PhD in Electronics & Signal Processing. Follow me on LinkedIn for more SciChart content, or twitter at @drandrewbt.","sameAs":["https:\/\/www.scichart.com","https:\/\/www.linkedin.com\/in\/dr-andrew-burnett-thompson\/","https:\/\/x.com\/drandrewbt"],"url":"https:\/\/www.scichart.com\/author\/andrew\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/blog_scichart\/8306"}],"collection":[{"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/blog_scichart"}],"about":[{"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/types\/blog_scichart"}],"author":[{"embeddable":true,"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/comments?post=8306"}],"version-history":[{"count":0,"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/blog_scichart\/8306\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/media\/8308"}],"wp:attachment":[{"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/media?parent=8306"}],"wp:term":[{"taxonomy":"blog_scichart_tag","embeddable":true,"href":"https:\/\/www.scichart.com\/wp-json\/wp\/v2\/blog_scichart_tag?post=8306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}