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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:06:21+00:00 2026-06-11T17:06:21+00:00

I have Android project (com.appocaliptic.quizknife.app) which uses Android library (com.appocaliptic.quizknife.core). What I am trying

  • 0

I have Android project (com.appocaliptic.quizknife.app) which uses Android library (com.appocaliptic.quizknife.core).

What I am trying to do, is to get resource id of the picture which is the library. Path to the image is: res/drawable-xhdpi/fr_200_133.png

However, all tries with getIdentifier result 0. Where is the problem?

resId = getResources().getIdentifier("fr_200_133", "drawable", "com.appocaliptic.quizknife.core");
resId = getResources().getIdentifier("com.appocaliptic.quizknife.core:drawable/"+"fr_200_133", null, null);
resId = getResources().getIdentifier("drawable/fr_200_133", null, "com.appocaliptic.quizknife.core");

Edited:

Ach, and in R.java there is drawable and corensponding attribute.

  • 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-11T17:06:22+00:00Added an answer on June 11, 2026 at 5:06 pm

    You should not be using the library package name. Try this instead:

    resId = getResources().getIdentifier("fr_200_133", "drawable", getPackageName());
    

    (or getContext().getPackageName() if this is executing in a view).

    The key is that you need to use the app’s package name (as listed in the manifest) rather than the library’s package name (which actually disappears when creating the app).

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

Sidebar

Related Questions

The situation I have is that I have an Android Project (regular) which uses
I have an Android Maven project, which uses pure Java libs, I've struggled with
I have a project (in Eclipse) which I've turned into an Android Project Library
I'm developing an Android project which currently has 4 packages: com.myapp.app.activities com.myapp.app.db com.myapp.app.ws com.myapp.app.utils
I have Android pet-project DroidIn which utilizes HttpClient 4 (built into Android) to do
I have an Android project that branched into three different applications, app-1 , app-2
I have an Android project in eclipse IDE which was working. After some imports
i have an android project which has a lot of classes I've built. i
I have come across a strange error. I have an Android project that uses
I have 1 android app project and 1 widget project, they all work fine.

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.