Azure / azure-spatial-anchors-samples

Azure Spatial Anchors sample code
Other
293 stars 139 forks source link

Android Platform Build Error when using ASA ver2.60 #224

Closed tianliang0314 closed 4 years ago

tianliang0314 commented 4 years ago

I follow the tutorial ,and when i build it ,there are some exceptions image how and i fix it?

rubit0 commented 4 years ago

Follow these steps:

  1. Go to Player Settings and open the Android section
  2. Open Publishing Settings section
  3. Enable the option "Custom Main Gradle Template"

Let us please know if this fixed your problem.

tianliang0314 commented 4 years ago

@rubit0 I've checked this option, and I found that it was already on。 checked this option, and I found that it was already on image this is where the exception occured

tianliang0314 commented 4 years ago

@rubit0 I just delete the MainTemplate.Gradle flie in plugins folder and enable the option "Custom Main Gradle Template" again to regenerate the MainTemplate.Gradle file, and when i build it, there are more less errors than before. MainTemplate.Gradle image

kaysabelle commented 4 years ago

Hi @tianliang0314, after you're created the custom mainTemplate.gradle file, you'll need to open it in a text editor and add the following lines to the dependencies section.

    implementation('com.squareup.okhttp3:okhttp:[3.11.0]')
    implementation('com.microsoft.appcenter:appcenter-analytics:[1.10.0]')

See the official documentation here for more info (scroll down to Android only: Configure the mainTemplate.gradle file): https://docs.microsoft.com/azure/spatial-anchors/how-tos/setup-unity-project?tabs=UPMPackage

tianliang0314 commented 4 years ago

@kaysabelle Thanks a lot