R.stamp Error 1
16lz
2022-04-24
(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.
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的方式引用就可以了~~
更多相关文章
- Android(安卓)so库编译错误 java.lang.UnsatisfiedLinkError: da
- Android(安卓)HAL:helloworld例程
- 解决jdk1.6已经安装,编译android源码报错问题
- [置顶] Android实用代码集
- Android(安卓)反编译,修改,重新打包,签名
- Android打电话,挂电话
- android activity 基类 通用方法
- Android中对图像进行Base64编码
- Android(安卓)反射获得控件对象