Ayy wadaap, tying out android development with kot...
# android
r
Ayy wadaap, tying out android development with kotlin and can't figure out of how to open new activities. I'm guessing it's the same as it is with java, so create new intent, start intent
i
r-z: Yes, however using the anko library you can simplify that to
Copy code
startActivity<SomeOtherActivity>("id" to 5)
https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents
r
Getting a really long error message if anko is installed. Messes up my android studio, installing a few updates and checking if that helps.
Cannot load project: com.intellij.ide.plugins.PluginManager$StartupAbortedException: com.intellij.diagnostic.PluginException: org/jetbrains/android/uipreview/AndroidLayoutPreviewToolWindowManager [Plugin: org.jetbrains.kotlin.android.dsl] So that's the message, any ideas what to do?
Does anyone know how to deal anko android studio error?
i
Try adding just
Copy code
compile 'org.jetbrains.anko:anko-common:0.9.1a'
I am assuming that it is the optional dsl part of anko that is making problems for you
r
Ah, I tried installing the plugin via sdk manager. This gradle build line seems like to be enough for it to work. Thanks a lot
r
it's just....
startActivity(Intent(this, ScreenResult::class.java))