views:

48

answers:

1

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/shadow"
        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

+1  A: 

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.

CommonsWare
Just before this answer i discovered that deleting the class files in bin/ solved the problem, so this will work. Thanks!
softarn