https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

dazza5000

03/18/2020, 2:06 PM
I get this error
r

russhwolf

03/18/2020, 2:13 PM
Try
id("com.android.library")
in your
plugins
block instead of using
apply()
.
d

Dominaezzz

03/18/2020, 2:14 PM
You have to apply the android plugin in the
plugins
block for this to work. Doing
apply(plugin = "com.android.library")
won't ......
What he said.
🙃 1
d

dazza5000

03/18/2020, 2:19 PM
it then says it cant find "com.android.library"
d

Dominaezzz

03/18/2020, 2:20 PM
You'll have to do some
pluginManagement
in your
settings.gradle.kts
file. Lemme find you a link.
r

russhwolf

03/18/2020, 2:21 PM
It should work from
buildScript
too.
Maybe try moving
google()
above
jcenter()
in
repositories {}
to make sure it's picking up the right plugin
d

Dominaezzz

03/18/2020, 2:22 PM
If the
buildscript
is declared in a parent gradle file iirc.
d

dazza5000

03/18/2020, 2:22 PM
Build file '/home/daz/IdeaProjects/krossplatform/build.gradle.kts' line: 13 Plugin [id: 'com.android.library'] was not found in any of the following sources:
i created this project using idea and it didn't seem to include a parent gradle file
r

russhwolf

03/18/2020, 2:23 PM
yeah go for
pluginManagement
then. That seems to be the more modern style anyway that Gradle has been suggesting
d

dazza5000

03/18/2020, 2:24 PM
is there a sample for that?
d

dazza5000

03/18/2020, 2:24 PM
legend - thank you
i was about to lose it! 😱
r

russhwolf

03/18/2020, 2:26 PM
yeah this stuff can be a little opaque at first
d

dazza5000

03/18/2020, 2:35 PM
thank you so much - by some kind of miracle I was able to get it all to work
3 Views