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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:29:59+00:00 2026-05-26T06:29:59+00:00

I have the following manifest (snippet): <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android android:versionCode=1 android:versionName=1.0 package=com.uniquename.appname>

  • 0

I have the following manifest (snippet):

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="1"
    android:versionName="1.0"
    package="com.uniquename.appname">

    <application
        android:icon="@drawable/ic_launcher_icon"
        android:label="@string/app_name"
        android:name=".activity.MainApplication">
    ....

where MainApplication.java lives in com.uniquename.appname.activity

Yet, when I launch this, I get the following error:

10-10 23:12:33.327: ERROR/AndroidRuntime(7783): java.lang.RuntimeException: Unable to instantiate application com.uniquename.appname.MainApplication: java.lang.ClassNotFoundException: com.uniquename.appname.MainApplication in loader dalvik.system.PathClassLoader[/system/framework/android.test.runner.jar:/data/app/com.uniquename.appname-1.apk]

which strikes me as odd, as I’ve explicitly asked it to look in the activity sub package. I’ve seen examples of others using this relative technique, yet it isn’t working for me. What’s wrong with my declaration? Thanks!

  • 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-26T06:30:00+00:00Added an answer on May 26, 2026 at 6:30 am

    Dang, always the case that you spend hours trying to figure it out, finally give up and ask the community and then 2 seconds later discover the answer. In my case, the answer is, yes, it is possible to use relative paths in the manifest.xml file. My problems stemmed from a large refactoring exercise which worked fine except that I forgot to update a few custom package names in my xml files (ticking ‘Update fully qualified package names in non-java files’ would have helped!).

    Anyway, these now-out-of-date package references caused the failure at runtime. Unfortunately, the error message you get is misleading and for me had nothing to do with my manifest declaration at all. Fixing the package names in my xml files (without touching my manifest) solved the issue for me. Hope this helps someone else some day.

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

Sidebar

Related Questions

I have the following application.xml <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.currency.mobile.android> <uses-permission android:name=android.permission.INTERNET/> <application
I have used the following in android manifest. <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:ads=http://schemas.android.com/apk/lib/com.google.ads
I have the following gradient_bg.xml: <?xml version=1.0 encoding=UTF-8?> <shape xmlns:android=http://schemas.android.com/apk/res/android android:shape=rectangle> <gradient android:type=radial android:gradientRadius=200
I have the following the layout file <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:app=http://schemas.android.com/apk/res/com.company android:layout_width=fill_parent
I have the following Manifest: <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.myapp.MainActivity android:versionCode=1 android:versionName=1.0.0 > <supports-screens android:anyDensity=false android:largeScreens=true
I have an assembly with the following manifest embedded: <assembly xmlns=urn:schemas-microsoft-com:asm.v1 manifestVersion=1.0> <dependency> <dependentAssembly>
I have a text file with following lines Manifest-Version: 1.0 MIDlet-Vendor: Croco Gamez MIDlet-Version:
I have a web app (extension) with the following manifest: { name: Porpington, version:
I have made following changes to the POM.xml file for adding a manifest file
I have following manifest: <supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:xlargeScreens=true android:anyDensity=true /> <compatible-screens> <screen android:screenSize=small/>

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.