android studio中Button id值报错 如图所示,不知道为什么报这个错误,google上也没有搜索到相关的信息。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 图好像不是很清晰,贴上代码:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="btn_dlg" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/text_dlg"/></LinearLayout>错误提示:Gradle: String types not allowed (at 'id' with value 'btn_dlg'). 一段简单的蓝牙扫描代码,老是出错,不知道什么原因! 求助!无法定位软件包 的错误 Android中日历问题 Java, JVM and Process问题 PreferenceScreen intent 实现跳 怎么隐藏平板最下面那条系统工具栏? Android4.3 BLE 多設備連結,求指點突破 请问关于imageview显示位置的问题 关于Vitamio中VideoView的使用 Android 导入android程序时遇到了问题 为什么android不用swing的控件
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="btn_dlg"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/text_dlg"/>
</LinearLayout>
错误提示:
Gradle: String types not allowed (at 'id' with value 'btn_dlg').