简体   繁体   中英

kotlin Unresolved reference: Class of the other library module

I have a library module: libCommon ,which contains a kotlin class:

open class Stu {
    var name=""
}

Have a default application module 'app' which api project(':libCommon'), Then create a class AStu in the app:

import siger.common.base.Stu
class AStu: Stu() {
}

Then build the project, get the error: Unresolved reference: Stu

But if change the Class Stu to java class, it gots okey.

How to make it with kotlin? Did i miss sth.? Any help will be appreciated.

found the Reason: Miss

apply plugin: 'kotlin-android' 

in the library module

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM