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

449
Views
Not able to access source code of AAR file build in Kotlin

I build a module in Kotlin, then import in my project. I put minifyEnabled false in module's build.gradle file. But unable to see the source code or unable to put a breakpoint.

It's working with Java but not with Kotlin.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Copy your aar file into src/main/libs folder.

enter image description here

Open Project Level build.gradle and add flatDir and its body's content like in the following example:

allprojects {
    repositories {
        flatDir {
            dirs ‘src/main/libs’
        }
        jcenter()
        google()
    }
}

After this open Application Level build.gradle and add aar file into dependencies:

dependencies {
    compile(name:'myFile', ext:'aar')
}

Then in Android Studio 3.2 press Ctrl-Shift-A when you're on Windows or press Cmd-Shift-A when you're on a Mac, type sync on your keyboard and choose Sync Project with Gradle Files command.

minifyEnabled flag stays for ProGuard, and it's turned off by default. Thus, both debug and release builds are not using ProGuard, and proguardFiles parameter's ignored.

enter image description here

Also, read this: Adding local .aar files to Gradle build using “flatDirs” is not working.

And this post: How to Include an External .aar File Using Gradle?

And this post: Why are there two build.gradle files in an Android Studio project?.

Hope this helps.

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!