This is a step-by-step guide for creating a basic ARCore app with Kotlin using Android Studio, with a little bit of an Introduction on ARCore and Kotlin. We start with knowing what ARCore is, moving to Kotlin and then the tutorial. In the end we compiled some questions to explore what a developer’s perspective would be on ARCore and Kotlin.

What is ARCore

ARCore is a software development kit (SDK) by Google. It is a developer’s tool for creating augmented reality apps on Android.

Up until now, ARCore was released as a developer’s preview but as of Feb ‘ 18, at the mobile world congress, version 1.0 of ARCore has been released.

With the launch of version 1.0, it means you can start creating augmented reality apps with ARCore and put them on the Google play store.

In case, you are hearing the word ‘ARCore for the first time, let me shine some light on the matter.

For Google to jump into the AR world and be able to compete with Apple on their Augmented Reality platform (ARKit), something big was missing. Using data from project Tango, (Google’s first take on Augmented Reality) ARCore came into existence.

Apps like Pokemon Go and IKEA Palace are prime examples of what an augmented reality app is like.

If you want to know more about Google’s ARCore, check out this article here.

Why Use Kotlin with ARCore

Kotlin is a statically typed programming language that runs on a Java Virtual machine (JVM). It is an officially supported Android programming language besides Java on Android Studio 3.0 or above.

So what makes Kotlin so exciting as a new language and that too, why try it out with ARCore?

  1. Because it’s new, and we are always excited about trying new tech, finding better and innovative ways of doing things.
  2. Kotlin has some really amazing features like the inbuilt ‘null safety’ – Goodbye Null pointer exceptions!
  3. The code is so concise! Compare java code with Kotlin code and you will see the difference.

These are just a few reasons that surfaced at the top of my mind and should be enough to get you started on a Kotlin-fied Augmented Reality journey.

Before we begin, lets find out:

What Do You Need To Get Started With ARCore Using Kotlin

First thing is first, you need Android studio 3.0 or above – because this version of Android has full support for Kotlin. You might get lucky with Android 2.3.3 but you will have to download the Kotlin plug-in yourself and test your luck.

We tested with Android 3.0.1 but it did not have emulator support for ARCore. So we tried 3.1 beta 4 version and it worked perfect with the ARCore sample app running on a virtual Pixel device. (Read ahead to know why you would need an emulator).

Also, we used to a Mac device to create this tutorial, things will be a little different on a windows based device.

Step 1: Locate Downloaded file on your System

Step 2: Run the file and wait for the setup to finish.

Step 3: You should be prompted with this screen.

Step 4: Click Android Studio and you should arrive at Android Setup Wizard. Let it download the required SDK components.



Step 5: Choose the Installation Type

It is best to go with the standard option, unless you REALLY know what you want in your Android Studio, because if you don’t then this will become a huge nuisance when you start to develop.

Step 6: Choose Your UI – This is just the look and theme of your Android Studio. You can even change this after the installation is complete.

Step 7: Let the Android magic begin – Note: You might be prompted to let Android change some setting, just type in your password and open security preferences for Android.



Congratulations! You have successfully Downloaded and Installed Android Studio on your device.

Next up is the ARCore SDK

You can either download it from google or clone the repository from Github. You need this SDK for utilizing AR elements and features. This integrates with Android studio. So you will download this on your laptop (or whatever you are using).

Step 1: Search for ‘ARCore’ and you will see Google’s Official ARCore page.

Step 2: Find Resources and click on the Downloads option.

Step 3: Donwload ARCore SDK for Android Studio.

If you want to clone it from Github – Follow on till step 2 and click on the Github link.

And now to the bane of all that is ARCore.

For creating an augmented reality app, you need a ARCore supported smartphone.

Google, originally, limited ARCore to a handful of Google pixel and Samsung galaxy smartphones BUT promised to bring ARCore to a million Android devices soon.

The promise of ‘SOON’ was met at the Mobile World Congress and the ‘million devices’ so to speak, boiled down to a few more handful devices.

But progress is progress, right? Google is planning on collaborating with other mobile companies to increase this list, at present ARCore is supported in the following smartphones.

Google Phones

  • Pixel
  • Pixel XL
  • Pixel 2
  • Pixel 2 XL

Samsung Phones

  • Galaxy S8
  • S8+
  • Note8
  • S7 edge

LG Phones

  • V30
  • V30+ (Android O only)

Asus Phones

  • Zenfone AR

OnePlus Phones

  • OnePlus 5

If you don’t have one of the above mentioned devices, here are two ways you can work this around.

Try following this guide on how to use ARCore on unsupported devices OR Run your app in an emulator.

Some developers say ARCore does not work with the emulator but Google in their official guide suggests otherwise. Since the version 1.0 was released just a few days ago, it’s too early to make up your mind on anything.

Try it out for yourself and let us know.

Here is how you setup an Emulator in Android Studio

Step 1: Navigate to ‘Tools’ on your Android Studio.

Step 2: Find ‘Preference’ option.

Step 3: On the side panel, Find ‘System Settings’ and in that you will find Android SDK.

Click on Android SDK and find Google APIs Intel x86  Atom System Image. If it is checked with a blue tick, that means it is already installed, if not you need to install it. Click on the box and press OK. I am adding other required SDk files as well. Make sure you have all of these installed.

In addition to the emulator, you will also need to setup a virtual device. Its only logical (pun intended) to use an ARCore supported device as a virtual device. Scroll to the list above.

Step 1: Click Tools, navigate to Android and in that find ‘AVD’. You will see this screen.

Step 2: When you click on ‘Create Virtual Device’, Android Studio shows you a list of devices of which you can create a virtual environment.

Since we are creating an ARCore app with Kotlin, Choose an ARCore supported device. We chose Pixel.

Step 3: Next choose the OS for the virtual device.

Step 4: Name your Virtual Device

Step 5: Finalize and Verify.

Step 6: One last thing. Before you finalize, navigate to Verify Configurations/ Show Advanced Settings and make sure you have the option checked for Camera back as a VirtualScene.

This is the very option that allows the emulator to use the camera feature for ARCore related tasks.

At this point, you have successfully created a virtual Pixel 2.

You can follow the same steps to create any other virtual device.

Almost there, covering the part where you get your mobile device ready.

You need to download ARCore services for your smartphone as well (If you are lucky enough to own one at the time of this tutorial, that is).

Google link for downloading ARCore service for phone

If you are using an unsupported device, you will need the modified version of this file. You can get that from HelloAR file link with the tango service.

Final step, Download OpenGL


Well, sadly ARCore does not have its own library for modeling 3d/2d objects.

So you need OpenGL to create 3d/2d objects, without which there will be no AR objects in your app. So some basic understanding of using OpenGL will do you great.

Think of OpenGL as ARKit’s Scenekit equivalent for ARCore.

This does mean more learning, especially if you are already new to Kotlin and ARCore, But the hard work is never wasted lads! As of this writing, ARCore is compatible with OpenGL ES 2.0 – 3.x.

Creating an ARCore Sample App with Kotlin

Open your Android studio and create a project with Blank activity and with Kotlin support enabled.

Once you are done, you should arrive at a Project like this:

First of all, I would suggest you fix you build.gradle files.

In your project’s build.gradle, i.e build.gradle (project: *YOUR PROJECT NAME*)

Add the following to the code


maven { url “” }

and Sync your project.

Now move to the next gradle file i.e build.gradle(Module: app)

Make sure this line is included as part of the dependencies:

implementation ‘’

implementation ‘’

And sync your project once again.

Once the syncing finishes, you will get this warning. This basically prompts you for a version change, since you added the above mentioned line code.

Just match the versions, and Sync again (If prompted) and you are good to go.

I would suggest removing the TextView in the center, as we have no use for it. Navigate over to the

Activity_main.xml file and remove the TextView Tag like so.

after removing TextView

Now add your string messages, that would appear when:

1: The app requires camera permission

2: We are trying to detect the surface

3: The app needs to notify that this is an unsupported ARCore device

Navigate over to the strings.xml file and add the lines like so:

<string name=“camera_permission_toast”>Camera permission is needed to run this application</string>

<string name=“searching_for_surfaces”>Searching for surfaces…</string>

<string name=“ar_device_support”>This device does not support AR</string>

Now you need to hop over to the assets folder and add an object file

App under progress – To be released soon