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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:04:04+00:00 2026-05-26T20:04:04+00:00

I am trying to fork my android app, and came upon a method thanks

  • 0

I am trying to fork my android app, and came upon a method thanks to my other question here using a library project. It is working fine enough for drawables and String assets. But now I’ve run into a problem.

I have a class (not an activity) which extends Application. I moved this class into my library project, and want to use it for the main application class in my two derived apps (works fine when directly in the main app).

Say my library is my.project.library and my app using the library is my.project
In the manifest for my.project I specified the following:

<application android:name="my.project.library.AppClass">

It compiles and deploys fine, but when I try to run it, it force-closes with the following exception:

11-15 03:14:25.707: E/AndroidRuntime(16800): java.lang.RuntimeException: Unable to instantiate application my.project.library.AppClass: java.lang.ClassNotFoundException: my.project.library.AppClass in loader dalvik.system.PathClassLoader[/data/app/my.project.apk]

From the drawables I also imported from the library, it seems that the library contents get in-lined into the main app. So I tried changing my manifest to:

<application android:name="my.project.AppClass">

but I still get the same error.

How can i reference a class in the library as my Application class in the main app?

  • 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-26T20:04:04+00:00Added an answer on May 26, 2026 at 8:04 pm

    Your original reference was correct.

    That is:

    <application android:name="my.project.library.AppClass">
    

    Sounds like you not referencing the library project properly see http://developer.android.com/guide/developing/projects/projects-eclipse.html the Referencing a Library Project section.

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

Sidebar

Related Questions

I'm trying to spawn a new process from my C++-project using fork-exec. I'm using
I'm trying to clone my personal fork on github using the git+ssh protocol with
I am trying to understand how Android launches applications. The question is how (and
I was trying to implement a checkpointing scheme based on multithreaded fork using fork
I am trying to create multiple processes using fork() and execvp() calls, but so
Hopefully a simple question. I'm trying to learn, simultaneously, fork(), pipe(), and waitpid() and
I am currently working on a project that is a spinoff (fork) from a
Trying to keep all the presentation stuff in the xhtml on this project and
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
I was trying some process operations like fork()ing and exec()ing I tried this Example

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.