密码形式 EditText 的 Hint 字体显示 异常

EditText password = (EditText) findViewById(R.id.register_password_text);password.setTypeface(Typeface.DEFAULT);password.setTransformationMethod(new PasswordTransformationMethod());

参考:
http://stackoverflow.com/questions/3406534/password-hint-font-in-android

TextView设置ellipsize=”end”省略号后面还有字

 android:ellipsize="end" android:maxLines="2"

Android 中常见bug 总结_第1张图片

原因:textview中包含了回车或者html字符
解决办法:
- myText.replaceAll("\\<.*?>","")
或者
- Html.fromHtml(myText).toString())

参考:
http://stackoverflow.com/questions/17131294/strange-issue-with-androidellipsize-end

warning: CRLF will be replaced by LF…..

在git提交的时候出现了这个错误,产生这个问题是因为在windows、Linux和Mac在处理文件换行时的标示符不一致。windows使用CRLF作为结束符,而Linux和Mac使用LF作为结束符。

如果刚从windows转到mac 开发,会遇到此错误,反之,则会出现warning: LF will be replaced by CRLF…..

解决办法:我们可以通过terminal.app 或者cmd 查看自己的git配置

$ git config core.autocrlf

如果显示true,则git会在提交的时候自动帮我们处理换行。可通过如下代码更改设置

$ git config --global core.autocrlf  true

路径错误

 Error:(1, 0) Your project path contains non-ASCII characters. This will most likely
cause the build to fail on Windows. Please move your project to a different
directory. See http://b.android.com/95744 for details.

This warning can be disabled by using the command line flag
-Dcom.android.build.gradle.overridePathCheck=true, or adding the line
‘com.android.build.gradle.overridePathCheck=true’ to gradle.properties file
in the project directory.

导入或者新建androidstudio项目的时候,路径中包含了中文,去掉中文即可!!

更多相关文章

  1. Android Bluetooth 文件接收路径修改方法
  2. Android App安装失败错误总结
  3. [Android Studio导入第三方类库方法] Error:(19, 23) 错误: 程序
  4. Android Permission denied 错误(附Android权限大全)
  5. android获取各种系统路径的方法
  6. Android Permission denied 错误 ( 附Android权限大全 )
  7. android install faild insufficient storage错误的解决方法
  8. Android错误处理——Android读取txt文件乱码解决方案

随机推荐

  1. 在Activity里获取android屏幕方向并处理
  2. Android Studio开发APP常用方法(一)
  3. android TabActivity中onKeyDown无效问题
  4. Android:注册一个方向传感器的回调,能够让
  5. android 特殊用法琐碎二
  6. 初识Android之(一)-自定义标题栏控件
  7. android 通过php post 向mysql数据库写入
  8. Android(安卓)官方自带侧滑菜单DrawerLay
  9. Android FFmpeg 脚本编译静态库
  10. 简单几段代码实现窗口抖动