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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:02:32+00:00 2026-05-28T03:02:32+00:00

I have encountered the following problem: 1) I have a Library ([x] Is Library

  • 0

I have encountered the following problem:

1) I have a Library (“[x] Is Library” selected) created in Eclipse. It has 2 layouts (main.xml and another one) included.

2) It works very well when I use it within one Eclipse Workspace – I can easily include it in another project and use it without issues.

3) My workspace got huge recently and Eclipse even slower than earlier (and I am working on an Intel Atom “powered” netbook). So I decided to create new one.

4) I have copied the mylibrary.jar file from its bin folder, including the library.jar in new project worked well. Everything compiles, but at runtime an java.lang.NoClassDefFoundError: my.namespace.mylibrary.R$layout is raised at startup.

What I have done:

1) I tried to find solution here on stackoverflow but NoClassDefFoundError on external library project for Android is what I found but I already have the jar file added.

2) Then I have looked into the jar file (renamed to zip & unpacked) to see that the R$layout class is not included there.

How can I get layout classes included into the library.jar file?

Is this really the source of my issue or I am doing something else wrong?

Thanks for advice.

Edit: I have checked and removing xml layouts from the library (e.g. creating a dummy one in code) stops the NoClassDefFoundError. Yet looking at admob.jar file seems it is possible to include R&layout class into the jar file.

  • 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-28T03:02:33+00:00Added an answer on May 28, 2026 at 3:02 am

    Seems the only answer to this one is to create layouts in .java file not in .xml. Tested this one and works well. No idea how admob get theirs layouts included in the .jar file.

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

Sidebar

Related Questions

Has anyone encountered the following problem: I have IIS7 running on my computer. On
I have the following problem that other people must have encountered. I am working
I'm learning C# and I encountered the following problem. I have two classes: base
I have the following problem. My main activity consists of a ListView populated with
I'm diving into EMF now, and have encountered the following problem: I'm trying to
I'm new to PHP, HTML and MySQL, and have encountered the following problem: I
Guys, please help me with the following problem. I have encountered the famous cannot
I use VS2010 and I have encountered following problem: HWND handle = NULL; handle
I am developing a silverlight navigation application and have encountered the following problem. I
I encountered a problem, have the following: DefaultController with a simple action: /** *

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.