11

I've imported a unity android project as module to my existing android studio project and came up with these errors while gradle syncing.

Error:Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :markerlessAR1. Open File
Show Details

5
  • Please provide your build.gradle(app). Commented Nov 18, 2017 at 7:37
  • 1
    Could you please share your build.gradle file. Commented Nov 18, 2017 at 9:38
  • having the same issue. :( have you fixed this? Commented Apr 20, 2018 at 12:15
  • please tell us how you added the Unity project, and show your build.gradle and settings.gradle files Commented Apr 20, 2018 at 12:36
  • I think your problem related to import Unity project to Android Studio Project. You can read at: stackoverflow.com/questions/35535310/…. Hope it's useful for you Commented Apr 27, 2018 at 0:43

2 Answers 2

2

I've solved the case on my end. The classes.jar was missing from my AAR file (didn't find that .jar when I 'unzipped' the AAR). So what I did was I rebuilt my AAR file by re-executing gradlew assemble and then imported this new AAR into my Android application project.

As for why the classes.jar was missing from my first AAR file, I have yet to uncover the mystery of that. I think I forgot to execute the gradle command and just picked the available AAR file from the newly created Android module out of the Unity-exported application project (because I was too excited).

Sign up to request clarification or add additional context in comments.

Comments

2

Try below steps to resolve this error:

1) Import AAR file in native android app from File -> Project structure -> add new aar package.

2) After successfully synced,make sure that your AAR module contain build.gradle file. For example: UnityAAR is your module name containing unityaar.aar file, build.gradle file.

3) If module gradle file is missing, add on your own. Gradle file contains configurations.maybeCreate("default") artifacts.add("default", file('unityaar.aar'))

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.