I am simply trying to start my program but appear to have difficultly getting past this error. I did some researching and it seems to be linked with intent. I have double-checked my manifest file (which will be posted below) and the package names appear to be correct.
One thing that did catch my eye was the second line of the exception log. It is looking for
class "com.project.BluetoothTransfer_v1000" on path:
at /data/app/com.project.BluetoothTransfer_v1000-1.apk
Is that '-1' supposed to be there?
04-10 16:04:49.182: E/AndroidRuntime(30008): FATAL EXCEPTION: main
04-10 16:04:49.182: E/AndroidRuntime(30008): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.project.BluetoothTransfer_v1000/com.project.BluetoothTransfer_v1000.BluetoothTransferActivity}: java.lang.ClassNotFoundException: Didn't find class "com.project.BluetoothTransfer_v1000.BluetoothTransferActivity" on path: /data/app/com.project.BluetoothTransfer_v1000-1.apk
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2229)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.access$700(ActivityThread.java:165)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.os.Looper.loop(Looper.java:137)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.main(ActivityThread.java:5455)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.reflect.Method.invoke(Method.java:525)
04-10 16:04:49.182: E/AndroidRuntime(30008): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
04-10 16:04:49.182: E/AndroidRuntime(30008): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
04-10 16:04:49.182: E/AndroidRuntime(30008): at dalvik.system.NativeStart.main(Native Method)
04-10 16:04:49.182: E/AndroidRuntime(30008): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.project.BluetoothTransfer_v1000.BluetoothTransferActivity" on path: /data/app/com.project.BluetoothTransfer_v1000-1.apk
04-10 16:04:49.182: E/AndroidRuntime(30008): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2220)
04-10 16:04:49.182: E/AndroidRuntime(30008): ... 11 more
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.project.BluetoothTransfer_v1000"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.project.BluetoothTransfer_v1000"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
You are missing the name of the activity into the Manifest.xml
<activity
android:name="com.project.BluetoothTransfer_v1000"
That´s the cause of the ClassNotFoundException:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.project.BluetoothTransfer_v1000.BluetoothTransferActivity" on path: /data/app/com.project.BluetoothTransfer_v1000-1.apk
Add the name of your activity "BluetoothTransferActivity" into the Manifest.xml:
<activity
android:name="com.project.BluetoothTransfer_v1000.BluetoothTransferActivity"
Related
hey guys I'm working on a launcher that is based off Launcher 3 form AOSP it works perfectly on my nexus 7 tablet and all my android phones I just got the samsung galaxy tab s 8.4 and when I try to run it it crashes before it launchers heres what logcat says:
04-10 07:46:57.757: E/ActivityThread(23606): Failed to find provider info for com.android.launcher2.settings
04-10 07:46:57.897: E/AndroidRuntime(23606): FATAL EXCEPTION: main
04-10 07:46:57.897: E/AndroidRuntime(23606): Process: com.android.launcher3, PID: 23606
04-10 07:46:57.897: E/AndroidRuntime(23606): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.launcher3/com.android.launcher3.Launcher}: java.lang.RuntimeException: Binary XML file line #16: You must supply a layout_width attribute.
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.access$900(ActivityThread.java:172)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.os.Handler.dispatchMessage(Handler.java:102)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.os.Looper.loop(Looper.java:146)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.main(ActivityThread.java:5653)
04-10 07:46:57.897: E/AndroidRuntime(23606): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 07:46:57.897: E/AndroidRuntime(23606): at java.lang.reflect.Method.invoke(Method.java:515)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
04-10 07:46:57.897: E/AndroidRuntime(23606): at dalvik.system.NativeStart.main(Native Method)
04-10 07:46:57.897: E/AndroidRuntime(23606): Caused by: java.lang.RuntimeException: Binary XML file line #16: You must supply a layout_width attribute.
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:492)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:6203)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:6372)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.widget.FrameLayout$LayoutParams.<init>(FrameLayout.java:615)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:559)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:56)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.LayoutInflater.inflate(LayoutInflater.java:486)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.Launcher.getQsbBar(Launcher.java:3427)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.SearchDropTargetBar.setup(SearchDropTargetBar.java:72)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.Launcher.setupViews(Launcher.java:1325)
04-10 07:46:57.897: E/AndroidRuntime(23606): at com.android.launcher3.Launcher.onCreate(Launcher.java:437)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.Activity.performCreate(Activity.java:5539)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
04-10 07:46:57.897: E/AndroidRuntime(23606): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368)
04-10 07:46:57.897: E/AndroidRuntime(23606): ... 11 more
I know it says the error is at line 16 in the xml but what xml file theres 30 xml files so if you have any ideas please let me know
The device is a Samsung Galaxy Tab S running 4.4.2
any help would be awesome
Thanks in advance
I figured it out! the xml in question is located in: res/layout-sw720p/search_bar.xml
on line 16 you need to add the following code:
android:layout_width="match_parent"
android:layout_height="match_parent"
This fixed the crashing issue I hope this helps anyone else who is having this issue!
I tried to apply splitdexfile option to split Facebook's sdk as a separate dex file.
What I've done so far:
1) I've added below line to my dexguard-project.txt file:
-splitdexfile com.facebook.**
2) And below line to my project.properties file:
proguard.config=dexguard-project.txt
3) I've exported a signed apk with Export Optimized and Obfuscated Application Package... (DexGuard) option successfully.
4) I checked and confirmed that the apk is splitted to 2 dex files:
Then I installed the apk to a device, and tried facebook connect and got;
java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = o.?$?)
I couldn't find the o.?$?class at generated mapping.txt file.
DexGuard Version: 6.1
Facebook SDK Version: 3.22.0
Full Stacktrace:
04-10 10:12:55.727: E/ActivityThread(15362): Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
04-10 10:12:58.039: E/AndroidRuntime(15362): FATAL EXCEPTION: main
04-10 10:12:58.039: E/AndroidRuntime(15362): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.devrim/com.facebook.LoginActivity}: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = o.?$?)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Looper.loop(Looper.java:137)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.main(ActivityThread.java:5103)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.reflect.Method.invoke(Method.java:525)
04-10 10:12:58.039: E/AndroidRuntime(15362): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
04-10 10:12:58.039: E/AndroidRuntime(15362): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-10 10:12:58.039: E/AndroidRuntime(15362): at dalvik.system.NativeStart.main(Native Method)
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = o.?$?)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readSerializable(Parcel.java:2177)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readValue(Parcel.java:2022)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readMapInternal(Parcel.java:2255)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Bundle.unparcel(Bundle.java:223)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Bundle.getSerializable(Bundle.java:1259)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.content.Intent.getSerializableExtra(Intent.java:4543)
04-10 10:12:58.039: E/AndroidRuntime(15362): at com.facebook.LoginActivity.onCreate(SourceFile:65)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.Activity.performCreate(Activity.java:5133)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 11 more
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.ClassNotFoundException: o.?$?
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.Class.classForName(Native Method)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.Class.forName(Class.java:204)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:2304)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readNewClassDesc(ObjectInputStream.java:1663)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:683)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1806)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:787)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2006)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1963)
04-10 10:12:58.039: E/AndroidRuntime(15362): at android.os.Parcel.readSerializable(Parcel.java:2171)
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 20 more
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.NoClassDefFoundError: o/?$?
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 30 more
04-10 10:12:58.039: E/AndroidRuntime(15362): Caused by: java.lang.ClassNotFoundException: Didn't find class "o.?$?" on path: DexPathList[[zip file "/data/app/com.devrim-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.devrim-1, /vendor/lib, /system/lib]]
04-10 10:12:58.039: E/AndroidRuntime(15362): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-10 10:12:58.039: E/AndroidRuntime(15362): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-10 10:12:58.039: E/AndroidRuntime(15362): ... 30 more
This is solved by adding below lines to dexguard-project.txt file:
-keep class * implements java.io.Serializable { *;}
-keepclassmembers class * implements java.io.Serializable { *;}
I have created an android project on eclipse and by default it generated the basic "Hello world!" app. With minSDK api level 8 and target api level 15 and also compiled with api 19 (latest). Everything else was set on default (blank activity etc). The problem is when I'm trying to run the app on my level 15 AVD it fails and the message "Unfortunately 'app's name' has stopped" shows up. Why is this happening? Can anyone help me fix this?
catlog
04-10 15:21:17.383: W/dalvikvm(645): VFY: unable to resolve static field 1630 (ActionBarWindow) in Landroid/support/v7/appcompat/R$styleable;
04-10 15:21:17.383: D/dalvikvm(645): VFY: replacing opcode 0x62 at 0x0004
04-10 15:21:17.392: D/AndroidRuntime(645): Shutting down VM
04-10 15:21:17.392: W/dalvikvm(645): threadid=1: thread exiting with uncaught exception (group=0x2ba041f8)
04-10 15:21:17.402: E/AndroidRuntime(645): FATAL EXCEPTION: main
04-10 15:21:17.402: E/AndroidRuntime(645): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
04-10 15:21:17.402: E/AndroidRuntime(645): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:104)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
04-10 15:21:17.402: E/AndroidRuntime(645): at com.example.asdf.MainActivity.onCreate(MainActivity.java:18)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.Activity.performCreate(Activity.java:4465)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.os.Looper.loop(Looper.java:137)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-10 15:21:17.402: E/AndroidRuntime(645): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 15:21:17.402: E/AndroidRuntime(645): at java.lang.reflect.Method.invoke(Method.java:511)
04-10 15:21:17.402: E/AndroidRuntime(645): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-10 15:21:17.402: E/AndroidRuntime(645): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-10 15:21:17.402: E/AndroidRuntime(645): at dalvik.system.NativeStart.main(Native Method)
04-10 15:21:17.692: I/dalvikvm(645): threadid=3: reacting to signal 3
04-10 15:21:17.702: I/dalvikvm(645): Wrote stack traces to '/data/anr/traces.txt'
04-10 15:21:17.943: I/dalvikvm(645): threadid=3: reacting to signal 3
04-10 15:21:17.952: I/dalvikvm(645): Wrote stack traces to '/data/anr/traces.txt'
Finally found a solution... I've tried to do the exact same thing as mentioned on those links and on other tutorials but could not get it fixed. Looks like eclipse was doing this automatically (including the appcompat v7 libraries and making a reference from my project to those lib). After comparing my project files with the same project files build on another environment/computer I found out that my project was missing a package in the gen folder. I fixed it by copying the package from the gen folder of the appcompat v7 project (android.support.v7.appcompat) to the gen folder of my project.
Windows 8
eclipse kepler (latest update)
sdk (latest update)
system x32
There was not such a problem on the x64 system enviroment.
I made an App. and since I just wanted to test some functions before adding them to the App,
I decided to copy my project into a new Project. When I tried to run the new project, the app crashes and the log-cat output is as follows.
Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidbook.MP"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:debuggable="true">
<activity
android:name=".MPActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="AddLocationActivity"></activity>
<activity android:name="MPData"></activity>
<activity android:name="MyLocations"></activity>
<activity android:name="MPInfo"></activity>
<activity android:name="Navigation"></activity>
</application>
LogCat:
05-21 15:30:03.710: E/AndroidRuntime(11294): FATAL EXCEPTION: main
05-21 15:30:03.710: E/AndroidRuntime(11294): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.androidbook.MP/com.androidbook.MP.MPActivity}:
java.lang.ClassNotFoundException: com.androidbook.MP.MPActivity in loader
dalvik.system.PathClassLoader[/data/app/com.androidbook.MP-1.apk]
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.os.Handler.dispatchMessage(Handler.java:99)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.os.Looper.loop(Looper.java:130)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.main(ActivityThread.java:3691)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.reflect.Method.invokeNative(Native Method)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.reflect.Method.invoke(Method.java:507)
05-21 15:30:03.710: E/AndroidRuntime(11294): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
05-21 15:30:03.710: E/AndroidRuntime(11294): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
05-21 15:30:03.710: E/AndroidRuntime(11294): at dalvik.system.NativeStart.main(Native Method)
05-21 15:30:03.710: E/AndroidRuntime(11294): Caused by: java.lang.ClassNotFoundException: com.androidbook.MP.MPActivity in loader dalvik.system.PathClassLoader[/data/app/com.androidbook.MP-1.apk]
05-21 15:30:03.710: E/AndroidRuntime(11294): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
05-21 15:30:03.710: E/AndroidRuntime(11294): ... 11 more
Check your Manifest file, if the activity is to be declared.
for Ex:
<application>
<activity android:name=".MyActivity" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Look through all the files in your new project and make sure they aren't referencing classes from the old project.
I think I found the solution, i should have checked that, the package name of the new project is included in the manifest file as for an example
"package="com.androidbook.MPTest" ..
my mistake is the i used the package name of the old project as a package name of the new project.
My app has been working fine the whole time I've been developing it, but it suddenly stopped working. It crashes right at the begining even before opening. The same thing happens on the phone or on the emulator. I went back a few versions that used to work as well, and they aren't working.
Could this be something to do with the android.jar??
Here is the LogCat:
04-09 23:59:00.065: I/Process(10872): Sending signal. PID: 10872 SIG: 9
04-10 00:01:29.875: D/AndroidRuntime(11072): Shutting down VM
04-10 00:01:29.875: W/dalvikvm(11072): threadid=1: thread exiting with uncaught exception (group=0x4001d560)
04-10 00:01:29.875: E/AndroidRuntime(11072): FATAL EXCEPTION: main
04-10 00:01:29.875: E/AndroidRuntime(11072): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.heatscore.pregame/com.heatscore.pregame.appMain}: java.lang.ClassNotFoundException: com.heatscore.pregame.appMain in loader dalvik.system.PathClassLoader[/data/app/com.heatscore.pregame-1.apk]
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1581)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.os.Looper.loop(Looper.java:123)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.main(ActivityThread.java:3701)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.reflect.Method.invoke(Method.java:507)
04-10 00:01:29.875: E/AndroidRuntime(11072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
04-10 00:01:29.875: E/AndroidRuntime(11072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
04-10 00:01:29.875: E/AndroidRuntime(11072): at dalvik.system.NativeStart.main(Native Method)
04-10 00:01:29.875: E/AndroidRuntime(11072): Caused by: java.lang.ClassNotFoundException: com.heatscore.pregame.appMain in loader dalvik.system.PathClassLoader[/data/app/com.heatscore.pregame-1.apk]
04-10 00:01:29.875: E/AndroidRuntime(11072): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
04-10 00:01:29.875: E/AndroidRuntime(11072): ... 11 more
And here is my manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.heatscore.pregame"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application android:icon="#drawable/icon" android:theme="#style/app_theme" >
<activity android:name=".appMain" android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="Login"/>
<activity android:name="MgtRecPredActivity"/>
<activity android:name="Tabs"/>
<activity android:name="ScheduleActivity"/>
<activity android:name="PredictionsActivity"/>
<activity android:name="ScoreboardActivity"/>
<activity android:name="AlertsActivity"/>
<activity android:name="SettingsActivity"/>
<activity android:name="AboutActivity"/>
<activity android:name="LogoutActivity"/>
<activity android:name="SetPrediction"/>
<activity android:name="FinalizePredictionActivity"/>
<activity android:name="RegisterAcitvity" android:windowSoftInputMode="stateHidden"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Your exception is a ClassNotFoundException. Eclipse should not compile, if the class is internal to your application. Maybe some external references broken?
If you are using Eclipse try 'clean project'