开发者

Pointers getting mixed up in android

I'm using ant to compile my android projects into debug apks. But sometimes when running my app, objects are getting mixed up and showing up at the wrong places.

For example:

<TextView android:id="@+id/deviceText"
        android:textSize="22sp"
        android:textColor="@color/white"
        style="@style/sha开发者_JAVA技巧dow"
        android:layout_column="0" />
<Button android:id="@+id/editDeviceButton"
        android:text="@string/edit"
        android:enabled="false" 
        android:layout_column="2" />

This is some code from profile.xml which is used in Profile.java. Here the @string/edit is a reference to the string "Edit", but instead of showing "Edit" in the app, is says "sdk" which is the text that should be assigned to the TextView. The "sdk" string is generated from Profile.java

To solve this problem I have to save the Profile.java file(which already exists) that use this xml file. And by save i mean just save it, not editing it at all, it is just as it were before.

Ant version: Apache Ant version 1.8.0 compiled on April 9 2010


I recommend instead of running just ant install, run ant clean install. This usually clears up any resource mixups like the one you are describing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜