user2855001
user2855001

Reputation: 13

import my library in app

I developed android library and I tried import this library in other app "compileOnly"

dependencies {
    compileOnly 'xxx.xxx.xxx:xx-xx-xx:1.0'
}

but gradle show me:

"Android dependency 'xxx-xxx-xxx:xx-xx-xx:1.0' is set to compileOnly/provided which is not supported"

Any idea?

Upvotes: 0

Views: 332

Answers (1)

Bryan Herbst
Bryan Herbst

Reputation: 67189

Android dependencies (AARs) can provide resources such as drawables and layout files that must be available in the build output. A compileOnly/provided dependency is not included in the build output, and thus the two are not compatible.

Upvotes: 1

Related Questions