Reputation: 29497
Please note: Although this question involves the new and highly experimental ARCore SDK, its really just a basic Android Studio usage question and should be answer-able by any battle-weary Android devs!
Android Studio 2.3.3 on a Mac here. I'm brand new to Android development but am fiending to try the new ARCore SDK out.
On their Getting Started page they advise installing Android Studio 2.3+ (which I just did) and then downloading the ARCore SDK zip and "extracting it". I did that, and now I have a folder on my machine called arcore-android-sdk-master
. But now I'm wondering how I import/hook-it-up to my Android Studio installation.
Opening Android Studio I see a Configure >> SDK Manager option, and when I click it I get the following screen:
But nowhere on that screen do I see an option to import an SDK ZIP file or install something from the local filesystem. Any ideas?
Upvotes: 2
Views: 3610
Reputation: 1533
When you clone the ARCore SDK, the root directory comes with a sample project and a library folder that contains an arcore_client.aar
file, this is an Android Archive (AAR) containing the SDK. If you wish, you can extract this AAR file with 7zip to get access to the arcore_client.jar
file to import into Android Studio following this method.
However, it is easier to just link to the AAR file with a gradle project set up. In order to use the SDK and make calls to the ARCore API, all you need to do is ensure that your project links to the AAR file. You can set up Android Studio to run the sample by following this guide.
The relevant part of the build.gradle file in the sample project provided for Android Studio that gives access to the library is as follows:
repositories {
flatDir {
dirs './libs', '../../../libraries'
}
}
dependencies {
compile (name: 'arcore_client', ext: 'aar')
...
}
The easiest and quickest way to get started would be to take the minimal sample application provided and build ontop of it.
Upvotes: 1
Reputation: 5007
You just have to open the sample project in AndroidStudio, no need to import it as SDK.
The sample project correctly links to the. aar in the library folder (cf. the build.gradle
)
Upvotes: 0