ClassNotFoundException when debugging an Android application

I get a ClassNotFoundException when I try to debug my application on Eclipse. I am using Asus Transformer Pad TF300T with Android version 4.1.1 on my home computer. Doing the same thing on my work computer, but with the Samsung Galaxy 10.1 with Android 3.2, everything works fine. This is the message I get:

11-22 09:15:14.313: E/AndroidRuntime(2609): FATAL EXCEPTION: main 11-22 09:15:14.313: E/AndroidRuntime(2609): java.lang.RuntimeException: Unable to get provider com.company.bill.contentprovider.BillProvider: java.lang.ClassNotFoundException: com.company.bill.contentprovider.BillProvider 

Names changed to protect the innocent;)
I suppose there are some problems with my environment, but I could not understand why. On my Assus, I turned on development options, USB debugging, stay awake, and allow unknown sources.

I tried to flip a breakpoint for ClassNotFound in eclipse but didn't change anything. I also tried to run eclipse as admin, but this did not help.

I got Eclipse Juno and 64-bit windows 7.

EDIT:
manifest file

  <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Light" android:testOnly="false" android:debuggable="true"> <activity android:name=".LoginActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> 
+4
source share
3 answers

I was able to fix it myself.
I downloaded the Android support library using the Android SDK Manager and fixed it.

+1
source

Have you added an activity declaration to the manifest file?

+2
source

try this way ...

  • Right-click on your project and open Properties.
  • go to the java ..// build path which is in the fifth position on the left.
  • Go to the "Order and Export" tab.
  • check (check the box) in the selected jar file. and click OK.
  • Now clean the project and run.
0
source

Source: https://habr.com/ru/post/1447692/


All Articles