(skipping hidden file 'packages/apps/Launcher/res/drawable-hdpi/.directory')
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.

packages/apps/Launcher/res/layout-port/launcher.xml:72: error: Error: This attribute must be localized. (at 'text' with value 'HelloWorld').

在launcher.xml中增加以下代码:

<TextView  android:id="@+id/mEnableText"android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true"android:textColor="#3fb2a0"android:text="HelloWorld"android:textSize="30px"/>

在修改系统Launcher代码的layout-port下的launcher.xml时出现了这个问题,编译不过去,很奇怪,前面的都是warning,我还以为是编译服务器不稳定导致的,后来又出现了这个问题,仔细看了一下发现有个error:This attribute must be localized. (at 'text' with value 'HelloWorld').,原来为了适应多国语言切换要求所有的字符串都是需要从strings.xml中读取,把HelloWorld放入strings.xml然后在这边使用@string/helloworld的方式引用就可以了~~

更多相关文章

  1. [置顶] Android实用代码集
  2. Android ViewPager和PagerAdapter简单代码写法
  3. Android新手入门实例之Android漂亮时钟的源代码
  4. 如何实现Android重启应用程序代码 ?
  5. android 复制字符串到剪贴板
  6. android常用的代码片段
  7. Android Camera代码位置
  8. Android Studio设置类代码模板
  9. Android获取高清app图标代码分享

随机推荐

  1. AndroidTextView的跑马灯效果,解决复杂布
  2. android 随手记 摄像头录像
  3. Android 自适应背光反应慢的修改
  4. Linux profilers: oprofile vs. ftrace (
  5. Android(安卓)发送HTTP GET POST 请求以
  6. Android 曲线绘制Demo
  7. 使用Android(安卓)Studio的AVD进行测试
  8. Android adb不是内部或外部命令 问题解决
  9. Android Button Maker(在线生成android sh
  10. AndroidManifest.xml的Service元素 andro