繁体   English   中英

指针在android中混淆了

[英]Pointers getting mixed up in android

我正在使用ant将我的android项目编译成debug apks。 但有时在运行我的应用程序时,对象会混淆并出现在错误的位置。

例如:

<TextView android:id="@+id/deviceText"
        android:textSize="22sp"
        android:textColor="@color/white"
        style="@style/shadow"
        android:layout_column="0" />
<Button android:id="@+id/editDeviceButton"
        android:text="@string/edit"
        android:enabled="false" 
        android:layout_column="2" />

这是profile.xml中使用的一些代码,它在Profile.java中使用。 这里@ string / edit是对字符串“Edit”的引用,但不是在应用程序中显示“Edit”,而是说“sdk”,这是应该分配给TextView的文本。 “sdk”字符串是从Profile.java生成的

要解决此问题,我必须保存使用此xml文件的Profile.java文件(已存在)。 通过保存我的意思是保存它,而不是完全编辑它,它就像以前一样。

Ant版本:2010年4月9日编译的Apache Ant版本1.8.0

我建议不要只运行ant install ,而是运行ant clean install 这通常可以清除您所描述的任何资源混淆。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM