At first it didn't work, but then I realised I needed to hit the refresh button in the UI (which refreshed gradle?) then it worked. Currently using Anko 0.8.3, works great! Thanks a bunch.
Because Anko DSL is just code in Kotlin, the build is required before the preview can be shown.
Try to use incremental compilation in Gradle (available in Kotlin 1.0.2), it works much faster with it. 馃憤
Android Studio 2.1.1
compile 'org.jetbrains.anko:anko-sdk23:0.9-beta1'
Got the error :
Rendering Problems The following classes could not be found:
-聽__anko.preview.View
@Adambl4 Can you provide a code fragment?
@yanex
class NotificationsListUI : AnkoComponent<NotificationsList> {
override fun createView(ui: AnkoContext<NotificationsList>) = with(ui) {
textView {
text = "test"
}
}
}
This is great! I was getting exceptions being thrown in the most recent repository version, but this seemed to clear them right up. I dropped a comment on the JB Plugins Repository pointing errant googlers here.
I'm installed the v0.9 ,and click the refresh button ,but when builded finish ,
will display some wrong , that's the log ,please fix it.
11:34:42 Plugin Error: Kotlin threw an uncaught IndexNotReadyException. Disable Plugin
11:34:42 IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
Rendering Problems
The following classes could not be found:
-聽__anko.preview.View (Change to android.media.tv.TvView, Fix Build Path, Create Class)
Tip: Try to build the project.
@yanex Hi, could you clarify what is the file you attached in the first post and how to use it if it's what intended?
Error with: com.intellij.diagnostic.PluginException: org/jetbrains/android/uipreview/AndroidLayoutPreviewToolWindowManager [Plugin: org.jetbrains.kotlin.android.dsl] when open a recent or start a new project when installed 0.9b, Android Studio 2.2.3
Cannot load project: com.intellij.ide.plugins.PluginManager$StartupAbortedException: com.intellij.diagnostic.PluginException: org/jetbrains/android/uipreview/AndroidLayoutPreviewToolWindowManager [Plugin: org.jetbrains.kotlin.android.dsl] when open an Android Project (0.9b android studio 2.2.3)
See also #314.
0.10.4-2 Always resulting in: Plugin Error: Anko Support threw an uncaught RuntimeException.
Most helpful comment
Cannot load project: com.intellij.ide.plugins.PluginManager$StartupAbortedException: com.intellij.diagnostic.PluginException: org/jetbrains/android/uipreview/AndroidLayoutPreviewToolWindowManager [Plugin: org.jetbrains.kotlin.android.dsl] when open an Android Project (0.9b android studio 2.2.3)