Android Studio 项目build 报错File path too long on Windows, keep below 240 characters

如题,解决办法:

project 的gradle文件中

 allprojects {
    repositories {
        jcenter()
        mavenLocal()
    }
    buildDir = "C:/tmp/${rootProject.name}/${project.name}"
} 
allprojects 下加入buildDir,如上文。
发布了35 篇原创文章 · 获赞 11 · 访问量 4万+
展开阅读全文

android studio报错XML:not well-formed

05-02

< RelativeLayout xmlns:android ="http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" android:background= "@drawable/baidi" > < ImageView android:id ="@+id/login_button" android:layout_width ="wrap_content" android:layout_height ="wrap_content" android:layout_centerHorizontal ="true" android:layout_marginTop ="50dp" android:src ="@drawable/yezizhi" /> <!--整体边框块的颜色 --> <LinearLayout android:id ="@+id/input" android:layout_width ="fill_parent" android:layout_height ="wrap_content" android:layout_below ="@id/login_button" android:layout_marginLeft ="28.0dip" android:layout_marginRight ="28.0dip" android:background ="@drawable/baidi" android:orientation ="vertical" > <!--账号框颜色--> < LinearLayout android:layout_width ="fill_parent" android:layout_height ="44.0dip" android:background ="@drawable/baidi" android:gravity ="center_vertical" android:orientation ="horizontal" > < EditText android:id ="@+id/searchEditText" android:layout_width ="0dp" android:layout_height ="fill_parent" android:layout_weight ="1" android:background ="@null" android:ems ="10" android:imeOptions ="actionDone" android:singleLine ="true" android:textSize ="16sp" android:hint="输入账户名" android:text="输入账户名"> < requestFocus /> </ EditText> </ LinearLayout> < View android:layout_width ="fill_parent" android:layout_height ="1.0px" android:layout_marginLeft ="1.0px" android:layout_marginRight ="1.0px" android:background ="#ffc0c3c4" /> <!--隐形显示文字,点击消失--> < EditText android:id ="@+id/password" android:layout_width ="fill_parent" android:layout_height ="44.0dip" android:background ="#00ffffff" android:gravity ="center_vertical" android:inputType ="textPassword" android:maxLength ="16" android:maxLines ="1" android:textColor ="#ff1d1d1d" android:textColorHint ="#ff666666" android:textSize ="16.0sp" android:hint="密码" android:text="输入密码" /> </LinearLayout > <Button android:id ="@+id/buton1" android:layout_width ="270dp" android:background ="@drawable/landi" android:paddingTop ="5.0dip" android:layout_height ="50dp" android:gravity ="center" android:textSize ="20dp" android:text = "登录" android:layout_alignBottom="@id/input" android:layout_centerHorizontal="true" /> </ RelativeLayout> 报错XML:not well-formed 错误地方在 android:layout_alignBottom="@id/input" 和 android:layout_below ="@id/login_button" 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览