kotlin / anko-example Goto Github PK
View Code? Open in Web Editor NEWA small application built with Anko DSL
Home Page: https://github.com/JetBrains/anko
License: Apache License 2.0
A small application built with Anko DSL
Home Page: https://github.com/JetBrains/anko
License: Apache License 2.0
I tried reading the anko docs but there is a lot going on there.
Thanks!
Android Studio 2.2.3, java-8 OpenJDK, Fedora 24. Just downloaded and opened project.
Error:(41, 13) Failed to resolve: org.jetbrains.anko:anko-sdk15:0.9.1
Hello Kotlin Team!
Thank you for the example. Would you all mind adding an explicit license so our team can use this as a template? I know the Readme says that it can be used as a template but an explicit license would be great.
~Earl St Sauver
Thanks for your example.
If my viewholder has a lot of views, how can i handle their reference.
Should i set a id in anko expression, and findViewById in viewholder?
getting the following:
Error:(43, 13) Failed to resolve: org.jetbrains.kotlin:anko:0.5-15s
app/build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:0.11.91'
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "io.dwak.blah"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'org.jetbrains.kotlin:kotlin-stdlib:0.11.91'
compile 'org.jetbrains.kotlin:anko:0.5-15s'
compile 'io.reactivex:rxjava:1.0.8'
compile 'io.reactivex:rxandroid:0.24.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
}
When I attempt to build, I get this error from Android Studio.
Error:(1, 0) The android gradle plugin version 2.4.0-alpha7 is too old, please update to the latest version.
To override this check from the command line please set the ANDROID_DAILY_OVERRIDE environment variable to "bb224d0df16322a5c3b8930d6ae3b41476360609"
Using gradlew
from the command line gives a similar the same error.
in richview.kt
private fun init() = AnkoContext.createDelegate(this).apply {
gravity = CENTER
I need add var gravity,why?
I tried to import this repo, but I got these errors when trying to build&run it:
Also, I tried to install the plugin to preview the Anko layout (this), but I don't see it...
How come?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.