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

  • SEARCH
  • Home
  • 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 7039037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:44:54+00:00 2026-05-28T01:44:54+00:00

I use a Java library that has a .xml file embedded, and uses this

  • 0

I use a Java library that has a .xml file embedded, and uses this in the code using
Library.class.getResourceAsStream("file.xml").

When I build with eclipse, everything goes fine. When I build with ant (without proguard), the resource can’t be found when running the app.

After some searching it turns out that the .xml file didn’t got added to the bin/classes folder. So I added a copy action after the javac command in the build.xml file.

<copy todir="${out.classes.absolute.dir}">
    <fileset dir="${lib_src}/src" includes="**/*.xml" />
</copy>

This works, in the sense that the xml files are now present in the classes folder. However, they do not get included in the final apk package.

What is going wrong here? Which build-action do I need to modify?

  • 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-05-28T01:44:55+00:00Added an answer on May 28, 2026 at 1:44 am

    I solved this issue by making the library android-only, not generic java. I added the xml file in the resources dir, I think it was in the raw dir or the xml dir. Then I used the standard android way to get those resources.

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

Sidebar

Related Questions

I found this open-source library that I want to use in my Java application.
I'm looking for a Java compression library that: is good for XML has a
I am trying to use some open source java library and that library has
There's a Java library that I would like to use in my project. My
I have a Java library that uses a few things from the Android APIs.
I am using Java to develop an application and I have a library that
I am trying to use the library spring-json.1.3.1 in a project that has been
I am using tika to extract text from a pdf file that has lot
so I'm building this collaborative filtering system using Weka's machine learning library JAVA API...
Is there any free java library which I can use to convert string in

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.