AAkira / Napier

Logging library for Kotlin Multiplatform
Apache License 2.0
786 stars 34 forks source link

Unresolved reference: Napier #26

Closed gotamafandy closed 4 years ago

gotamafandy commented 4 years ago

hi, i'm getting Unresolved reference: Napier when trying to run this library. This is my gradle setup:

  sourceSets["commonMain"].dependencies {

        // Logging
        implementation("com.github.aakira:napier:${ extra.get("napierVersion") }")
    }
 sourceSets["androidMain"].dependencies {

        // Logging
        implementation("com.github.aakira:napier-android:${ extra.get("napierVersion") }")
    }
sourceSets["iosMain"].dependencies 

        // Logging
        implementation("com.github.aakira:napier-ios:${ extra.get("napierVersion") }")
    }

i can import and use this library with no error in IDE, but when trying to compile i get the error.

please help.

AAkira commented 4 years ago

I'm sorry. I have no idea. I can use this library through jCenter. You can download it from here

Do you have a sample project?

gotamafandy commented 4 years ago

hi Aakira, here's the example project:

https://www.dropbox.com/s/75oudosbg2qafcj/KotlinMPP.zip?dl=0

AAkira commented 4 years ago

@gotamafandy

Do you have a gradle file in the root directory? The gradle file in common directory looks good to me.

gotamafandy commented 4 years ago

hi @AAkira, no i don't have any build.gradle in root directory

AAkira commented 4 years ago

I think you should add a build.gradle in root directory.

I add the example of napier. You can check here.

https://github.com/AAkira/mpp-example/tree/napier-example

gotamafandy commented 4 years ago

thanks i'll take a look. I'm going to close this issue now