touchlab / KaMPKit

KaMP Kit by Touchlab. A collection of code & tools designed to get your mobile team started quickly w/Kotlin Multiplatform
https://touchlab.co/
Apache License 2.0
2.2k stars 199 forks source link

the dreaded NDK version is UNKNOWN #43

Closed trurebel closed 4 years ago

trurebel commented 4 years ago

Hi,

Apologies if this is too generic and/or ignorant, but both my clones in the latest OSX and Windows Android Studio would fail at syncing with the

NDK Resolution Outcome: Project settings: Gradle model version=5.6.2, NDK version is UNKNOWN

This failure persisted after setting the NDK path under Project Structure, in Windows there is a "Download" button to get the NDK, in MacOS I pointed to a manually unpacked NDK.

The "sync" and eventually the build completed successfully after closing the projects on both platforms and clicking Import Project, which revealed that the UKNOWN message is still in the log, but somehow not the showstopper that it was before the import, no clue what is happening there. I am also confused why Android Studio does not automagically fetch and configure an NDK when required in a project, is it possible that KaMPKit is using an antipattern here, or hitting a Google bug (I saw there is an open issue in Google's Issue Tracker)?

Thanks!

RyanSimon commented 4 years ago

@trurebel

I came across the same issue when I was setting up the project, and reported it to @kpgalligan.

It sounds like the project is missing a configuration step, and just needs to be added to the documentation.

dkdevpro commented 4 years ago

It got fixed if I use the "import" option instead of "open" in the android studio. I guess a Gradle fix is required here.

saikiran143 commented 4 years ago

Could you please explain clearly, Iam getting same issue here. Tell me where i need to modify the code..

dkdevpro commented 4 years ago

Could you please explain clearly, Iam getting same issue here. Tell me where i need to modify the code..

In the android studio, while you import the project, try to use "Import project" option instead of "Open an existing project".

saikiran143 commented 4 years ago

Iam importing project through version control, so iam getting this error. According to your suggestion, i downloaded and imported the project. Now it's working fab.. Tq @dino9

samhill303 commented 4 years ago

Glad you got it working. We also ended up removing the idea folder from the sample forcing it to create a new one. A little heavy handed but hopefully people shouldn't see this in the future