Reputation: 19
I had a problem while trying to import Unity ads to my Android Studio project. I found many answers from forum about adding module unity-ads.aar file to android studio. Android studio window doesn't allow me click finish button to add this file to project.
I enclose the picture showing that android studio doesn't recognize that file.
Upvotes: 0
Views: 1036
Reputation: 127
Actually, in its recent update, Android Studio has removed the option to import modules .arr
file. Now you need to manually import it. Just follow the steps below to add .arr
file to your project.
Step 1: switch your app to project mode
Step 2: Create a new directory and name it libs
Step 3: Now manually open that directory location in your file explorer and paste unit-ads.arr
Now go to your app-level Gradle and add the module as a dependency
implementation files('../libs/unity-ads.aar')
Also do add .arr
in the file tree
implementation fileTree(dir: 'libs', include: ['*.jar', '*.arr'])
Now sync the project, and you should be able to use a new module inside your code.
Don't know why Android Studio removed this option and why unity hasn't switched to mavenCentral()
or any easier solution. But for now, this method works for me.
Upvotes: 1