Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

How to develop AndroidUIX app in Kotlin. (instuction) #11

Open
uglyer opened this issue Jul 15, 2017 · 3 comments
Open

How to develop AndroidUIX app in Kotlin. (instuction) #11

uglyer opened this issue Jul 15, 2017 · 3 comments

Comments

@uglyer
Copy link

uglyer commented Jul 15, 2017

1.Install ts2kt https://github.com/Kotlin/ts2kt
2.Converter of android-ui.d.ts to Kotlin declarations (stubs)
3.Dev in Kotlin your app.
4.Build KotlinJS project.

wait bug fixed
https://github.com/Kotlin/ts2kt/issues/53

@linfaxin
Copy link
Owner

Amazing~ 👍 :)

@uglyer
Copy link
Author

uglyer commented Oct 16, 2017

image
等ts2kt修复bug遥不可及,手动翻译了一下.d.ts文件,成功的用kotlin尝试,但是有些问题,譬如调用super的方法
super.onCreate kotlin 编译后的js 是 this.onCreate(savedInstanceState, android.app.Activity.prototype.onCreate$default.bind(this));
执行就报错了 Cannot read property 'bind' of undefined
手动把mCalled改为true发现可以用,很意外。

@uglyer
Copy link
Author

uglyer commented Oct 31, 2017

image
移植anko成功.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants