5

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.

Andy Jazz
  • 36,357
  • 13
  • 107
  • 175
Azay Gupta
  • 251
  • 1
  • 13

1 Answers1

-1

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.

Andy Jazz
  • 36,357
  • 13
  • 107
  • 175