Hello, I am new to Kotlin Multiplatform. I want t...
# multiplatform
z
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
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
z
all right make sense. Thank you very much I'll do that then.
z
@Kris Wong thanks so much. That's exactly what I was looking for. I think you just saved me a lot of time :)
k
that is the point indeed!