Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9055727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:01:34+00:00 2026-06-16T14:01:34+00:00

After using ant build, I get some drawable ids mixed up when I am

  • 0

After using ant build, I get some drawable ids mixed up when I am trying to assign them problematically(not in the xml).

I have an array that is holding some drawable ids:

int[]ids={R.drawable.pic1,R.drawable.pic2,R.drawable.pic3,R.drawable.pic4};

And when I try to assign them to an imageview a different drawable is displayed.

@Override
protected void onCreate(Bundle arg0) {
    super.onCreate(arg0);
    setContentView(R.layout.somelayout);
    iv = (ImageView)findViewById(R.id.image);
    iv.setBackgroundResource(ids[0]);
}

It doesn’t happen when I set the drawable in the xml, this works :

<ImageView
    android:id="@+id/image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/pic1" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:01:35+00:00Added an answer on June 16, 2026 at 2:01 pm

    Try closing Eclipse and running ant clean followed by ant from the command line. If that works, the most likely problem is that your ant script is building to the same directories as Eclipse, and if Eclipse is running while doing the ant build, it may detect changed files and run its own builds at the same time. This can cause some inconsistent results based on timing of the builds.

    In general, be sure that your ant scripts build to different directories from those that Eclipse uses. This includes the “gen” directory – use a separate one for ant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to re-sign some jars using the ant task 'signjar' however it's
I am running a headless Buckminster build using ant that for some reason is
After using several non compatible barcode generators gems in rails 3.2, i am trying
After using PHP for a while now, I've noticed that not all built-in PHP
After using this code to get my link to show me 3 database entrys
I've just started using maven for trying to build a multi module project. Everything
I am converting ant to maven2. In build.xml, I have: <target name=clean> <delete file=${dir.dist}/${api.jarfile}
After building an application by using ant, i am copied the component to a
In my ant build, I am using maven-ant-tasks to pull dependencies for my project.
I'm stuck on a couple of points trying to build JS apps with ant.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.