在创建模块时用JAVA语言不能选择empty activity,在Kotlin语言才可以选择empty activity
用JAVA语言选择empty activity时下一步按钮不能点击,左下角显示需要Kotlin,直接在上一个页面选择Kotlin就不会显示,可以直接下一步。我也是跟着视频教程去学,视频中可以直接JAVA选择empty activity下一步。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@drawable/bg_environment">
<LinearLayout
android:layout_width="1200px"
android:layout_height="800px"
android:background="@drawable/bg_frame_descend_setting"
android:layout_centerInParent="true"
android:orientation="vertical">
<Button
android:id="@+id/camera"
android:layout_width="600px"
android:layout_height="wrap_content"
android:background="@drawable/btn_page_hover"
android:text="打开系统相机"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
<Button
android:id="@+id/transfer"
android:layout_width="400px"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/btn_page_hover"
android:text="打开欢迎界面"/>
<Button
android:id="@+id/button"
android:layout_width="400px"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="@drawable/btn_page_hover"
android:text="显示intent"/>
</RelativeLayout>
可以啊,贴个截图看看