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

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.

主站蜘蛛池模板: 濮阳县| 富民县| 汉沽区| 扎赉特旗| 阜宁县| 称多县| 广元市| 邯郸市| 桂林市| 武隆县| 凉城县| 九龙坡区| 伊金霍洛旗| 宝清县| 田东县| 乐安县| 习水县| 运城市| 怀集县| 普安县| 九龙坡区| 搜索| 辽宁省| 鄂伦春自治旗| 三台县| 德钦县| 弥渡县| 油尖旺区| 南昌市| 景德镇市| 新野县| 宁津县| 宁安市| 杭锦旗| 南和县| 浦城县| 万荣县| 喜德县| 玉林市| 如皋市| 玛沁县|