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

  • Home
  • SEARCH
  • 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 7571373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:39:35+00:00 2026-05-30T15:39:35+00:00

I have got a few (4) error reports on my app from when the

  • 0

I have got a few (4) error reports on my app from when the Android system decides to do the backup to Google cloud using the BackupAgent. I am using the SharedPreferencesBackupHelper.
The stack trace looks like this (my real package name is replaced below by com.xxx.yyy):

java.lang.RuntimeException: Unable to create BackupAgent com.xxx.yyy.MyBackupAgent: java.lang.ClassNotFoundException: com.xxx.yyy.MyBackupAgent in loader dalvik.system.PathClassLoader[/mnt/asec/com.xxx.yyy-1/pkg.apk]
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2114)
at android.app.ActivityThread.access$3200(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1138)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.xxx.yyy.MyBackupAgent in loader dalvik.system.PathClassLoader[/mnt/asec/com.xxx.yyy-1/pkg.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2064)
... 10 more

I have even got the program crash once myself, on my own phone which is running Android 2.3.3. What puzzles me with this program crash is that I for sure knows that the class “MyBackupAgent” IS present in the package. I also know for sure that the backup to cloud is working on the same phone where I once got the crash.

I have searched quite a lot on the net for a solution for what the reason could be for this problem. All cases I have found on similar problems, that is a ClassNotFoundException is thrown from PathClassLoader even though the class is present in the apk, have one thing in common. They all have a trailing “-1” or “-2” and the end of the package name directory where the apk is installed.

In my error reports, these are the different names for where the dalvik.system.PathClassLoader searches for my backup class:

/mnt/asec/com.xxx.yyy-1/pkg.apk

/data/app/com.xxx.yyy-1.apk

/mnt/asec/com.xxx.yyy-2/pkg.apk

Maybe I am fishing in the wrong lake here but what does these appended “-1” and “-2” at the end of the package name directory mean, and could the problem be related to this? I doubt the problem lies in my code, since just tell the system to schedule the backup of my sharedpreferences. Then the Android system engage the backup action at a suitable time in the future – and this is where the crash happens. Looking at the stack trace, my code is not even mentioned. It is all system routines that ends up searching for my backup class in the apk and can for some unknown reason not find it.

I have not set android:name attribute in the application tag in the Manifest, which I read could cause similar error.

Does anyone have a clue for what could cause this? Or better yet, how to avoid that this happens.

  • 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-30T15:39:36+00:00Added an answer on May 30, 2026 at 3:39 pm

    “/mnt/asec” prefix means that the phone is mounted to the pc and during that time when the app is trying to run or backupagent is trying to run (the app is not used already) it crashes. It is expected since the phone is mounted.

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

Sidebar

Related Questions

I have got the following code from here to read an Excel file using
I've got code that I am using from another team and I have spent
I am working on In App billing ans from last few days i have
I have probem / strange question, i got algorithm with few for loops and
I have looked at Spring MVC a few times briefly, and got the basic
I am using dshownet(first time) and C#. I have got a sample to take
I got this an asp.net 3.5 page that and I have few tabs (telerik
We have a few C++ solutions and we run some build scripts using batch
I try to import com.android.vending.billing.IMarketBillingService. But I got the error: The import com.android.vending.billing.IMarketBillingService cannot
I have got few questions regarding creating windows service. I have created a windows

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.