官术网_书友最值得收藏!

Converting Java code to Kotlin code

From the menu select CodeConvert Java File to Kotlin File and kaboom! Your task is done. Your first Kotlin activity is ready. As a means of verifying everything is fine, we suggest you run the project once. If you can see Hello World on the emulator or device that means you have successfully configured Kotlin for Android.

Or, create a new Kotlin file (File NewKotlin File/Class), and then paste your Java code into that file, when prompted, click Yes to convert the code to Kotlin. You can check Don't show this dialog next time, which makes it easy to dump Java code snippets into your Kotlin files:

Have a watchful eye on such conversion that IDE is doing for you. With great power comes great responsibility. It's always better to check whether IDE has done the right thing for you or not. IDE is not yet that smart and stable that it can convert the code with optimization as well.

主站蜘蛛池模板: 宜黄县| 论坛| 广安市| 西乌珠穆沁旗| 普安县| 黔南| 武川县| 克东县| 靖江市| 绥化市| 调兵山市| 南平市| 墨脱县| 平昌县| 远安县| 镇安县| 中方县| 偏关县| 苍梧县| 巨野县| 辽阳市| 万州区| 涿鹿县| 通城县| 曲周县| 临湘市| 西贡区| 革吉县| 浙江省| 建阳市| 长垣县| 柞水县| 永靖县| 塔城市| 军事| 政和县| 宁海县| 蛟河市| 靖江市| 江陵县| 栾川县|