Hello,
I am new to Kotlin Multiplatform. I want to make a mobile app in ios and android.
I am trying to implement a third party library written in C/C++.
I want to create the following function in androidMain :
Copy code
fun setContext(currentActivity: Activity){
connector.setUIContext(currentActivity) // this function is from the third party library
}
I wonder how I could access the type Activity. It looks it does not recognise it or the android api is not accessible.
Do I need to add anything in the build.gradle.kts?
Thanks for your help
m
magnumrocha
04/21/2020, 10:53 AM
you should config the android target in your gradle file, to setup an android lib, just like you would config in a android gradle prroject