Kotlin / anko-example

A small application built with Anko DSL
https://github.com/JetBrains/anko
Apache License 2.0
284 stars 64 forks source link

Can't build&run sample, and can't use plugin #11

Closed AndroidDeveloperLB closed 7 years ago

AndroidDeveloperLB commented 7 years ago

I tried to import this repo, but I got these errors when trying to build&run it:

image

Also, I tried to install the plugin to preview the Anko layout (this), but I don't see it...

How come?

rcgonzalezf commented 7 years ago

I'm getting the same issue with Android Studio 3.0, I was able to compile the project by commenting out the gravity line and leaving only one constructor:

constructor(context: Context?) : super(context) { init() } Since it's just a demo, I think it could help you to have a glance, still it will be interesting to find a real solution to this problem and maybe do a PR with the fixed solution.

@AndroidDeveloperLB Do you still have the same issue?

rcgonzalezf commented 7 years ago

I was able to fix the compilation issue as you can see in the following PR: https://github.com/Kotlin/anko-example/pull/13

TLDR: Use the anko version '0.10.1' instead of '0.10.0-beta-2'

I hope it helps you.

AndroidDeveloperLB commented 7 years ago

Seems to work fine now. Please update the repo with latest versions of everything. Android Studio reached RC version already.

I'm also pretty sure it will work with targetSdkVersion 26 .