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 8305657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:09:41+00:00 2026-06-08T18:09:41+00:00

I am trying to open a file for an Android app I am making.

  • 0

I am trying to open a file for an Android app I am making. I tested the code that opens this file on a regular Java project, and it opens fine. However when I use this code in an Android Java project I get an java.io.FileNotFoundException error.

File file = new File ("list.plist");

Now the list.plist file is in the parent directory of the project. This file will be included in the app as its the only one it will be using.

I guess I am used to Xcode where I can just place the file anywhere in the project and I can access it without a problem.

How am I supposed to structure this path?

Thanks 🙂

I’ve used this but it also did not work.

File file = new File(context.getFilesDir().getAbsoluteFile(), "list.plist");

  • 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-08T18:09:42+00:00Added an answer on June 8, 2026 at 6:09 pm

    Firstly, you need to ensure the file you are using is packaged within your app – such as in the assets directory.

    Secondly, Android automatically compresses plist files based on the extension. As a workaround, change the extension to something Android will not compress. These extensions include:

    ".jpg", ".jpeg", ".png", ".gif",
    ".wav", ".mp2", ".mp3", ".ogg", ".aac",
    ".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet",
    ".rtttl", ".imy", ".xmf", ".mp4", ".m4a",
    ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2",
    ".amr", ".awb", ".wma", ".wmv"
    

    (for full article, see dealing-with-asset-compression-in-android-apps)

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

Sidebar

Related Questions

I'm trying to open the SMS db (for censor app) with this code: SQLiteDatabase
I am trying to open the SD card and upload a file in Android
I am trying to load a TGA file in Android NDK. I open the
I'm trying to open a file for input in Excel with this line :
I'm trying to open a file in a Java program (say Program.java ) using
I am trying to send data from an Android app to a PHP file
I am trying to write twitter app using android. The twitter login page opens
I'm trying to write an Android 2.2 app that will find installed apps that
I'm trying to create an ePub file in android. Below is my source code.
I'm trying to create an ePub file in android. Below is my source code.

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.