Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

312
Views
Attaching Kotlin sources to AAR doesn't work in Android Studio

I am trying to add Kotlin sources of an AAR in Android Studio 3.3.2. It doesn't work when I select "Choose Sources..." and choose the corresponding source.jar. Android Studio only displays "Attaching..." but nothing happens, as seen in the screenshot below.

enter image description here

Either there is a Bug in Android Studio since I can see a NoSuchElementException in the logs or the source.jar is not as needed. Any hint's to solve the issue are welcome.

Here is the exception:

java.util.NoSuchElementException
    at java.util.Collections$EmptyIterator.next(Collections.java:4189)
    at org.jetbrains.plugins.gradle.util.GradleAttachSourcesProvider.getSourceFile(GradleAttachSourcesProvider.java:160)
    at org.jetbrains.plugins.gradle.util.GradleAttachSourcesProvider.access$100(GradleAttachSourcesProvider.java:59)
    at org.jetbrains.plugins.gradle.util.GradleAttachSourcesProvider$1$1.onSuccess(GradleAttachSourcesProvider.java:126)

NOTE: I opened a ticket for Android-Studio -> https://issuetracker.google.com/issues/128352536

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Configure kotlin in your project following these steps:-

in build.gradle

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'

also add

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"

Clean and Build your project. It worked for me.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!