i am using contacservice class and i set the usercredentials of my gmail account
and i want to get the contact from the google contacts for that my code as follows
ContactService myservice=new ContactService("ex-app-1.0");
myservice.setUserCredentials("username","password");
URL url=new URL("https://www.google.com/m8/feeds/contacts/xxx#gmail.com/full");
ContactFeed resultFeed = myService.getFeed(feedUrl, ContactFeed.class);
but i got an exception like this in logcat
03-16 12:24:49.217: E/AndroidRuntime(1013): FATAL EXCEPTION: main
03-16 12:24:49.217: E/AndroidRuntime(1013): java.lang.RuntimeException: Unable to start activity
ComponentInfo{c.b.p/c.b.p.ContactsBackupActivity}: java.lang.NullPointerException
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.os.Handler.dispatchMessage(Handler.java:99)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.os.Looper.loop(Looper.java:123)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-16 12:24:49.217: E/AndroidRuntime(1013): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 12:24:49.217: E/AndroidRuntime(1013): at java.lang.reflect.Method.invoke(Method.java:521)
03-16 12:24:49.217: E/AndroidRuntime(1013): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-16 12:24:49.217: E/AndroidRuntime(1013): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-16 12:24:49.217: E/AndroidRuntime(1013): at dalvik.system.NativeStart.main(Native Method)
03-16 12:24:49.217: E/AndroidRuntime(1013): Caused by: java.lang.NullPointerException
03-16 12:24:49.217: E/AndroidRuntime(1013): at c.b.p.ContactsBackupActivity.onCreate(ContactsBackupActivity.java:128)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-16 12:24:49.217: E/AndroidRuntime(1013): ... 11 more
03-16 12:29:49.329: I/Process(1013): Sending signal. PID: 1013 SIG: 9
Related
In my android project i use other projects as librarys. They are added in the build path as Projects and in Order and Export
03-16 19:54:32.418: I/System.out(27217): Antes del unmarshal
03-16 19:55:36.488: W/dalvikvm(27217): VFY: unable to find class referenced in signature (Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;)
03-16 19:55:36.488: I/dalvikvm(27217): Could not find method com.theoryinpractise.halbuilder.api.ReadableRepresentation.getValue, referenced from method com.theoryinpractise.halbuilder.jaxrs.HalUnmarshaller.getObjectFromRepresentation
03-16 19:55:36.488: W/dalvikvm(27217): VFY: unable to resolve interface method 11651: Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;.getValue (Ljava/lang/String;)Ljava/lang/Object;
03-16 19:55:36.488: D/dalvikvm(27217): VFY: replacing opcode 0x72 at 0x003e
03-16 19:55:36.498: W/dalvikvm(27217): VFY: unable to resolve exception class 1502 (Lcom/theoryinpractise/halbuilder/api/RepresentationException;)
03-16 19:55:36.498: W/dalvikvm(27217): VFY: unable to find exception handler at addr 0x58
03-16 19:55:36.508: W/dalvikvm(27217): VFY: rejected Lcom/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller;.getObjectFromRepresentation (Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;Ljava/lang/Class;)Ljava/lang/Object;
03-16 19:55:36.508: W/dalvikvm(27217): VFY: rejecting opcode 0x0d at 0x0058
03-16 19:55:36.508: W/dalvikvm(27217): VFY: rejected Lcom/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller;.getObjectFromRepresentation (Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;Ljava/lang/Class;)Ljava/lang/Object;
03-16 19:55:36.508: W/dalvikvm(27217): Verifier rejected class Lcom/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller;
03-16 19:55:45.828: W/System.err(27217): java.util.concurrent.ExecutionException: java.lang.VerifyError: com/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller
03-16 19:55:45.848: W/System.err(27217): at java.util.concurrent.FutureTask.report(FutureTask.java:93)
03-16 19:55:45.848: W/System.err(27217): at java.util.concurrent.FutureTask.get(FutureTask.java:163)
03-16 19:55:45.858: W/System.err(27217): at android.os.AsyncTask.get(AsyncTask.java:483)
03-16 19:55:45.858: W/System.err(27217): at com.example.modelo.ObtieneRecursos.obtieneTokenMe(ObtieneRecursos.java:49)
03-16 19:55:45.868: W/System.err(27217): at com.example.pestanasholacampus.InitActivity.compruebaUsuario(InitActivity.java:123)
03-16 19:55:45.878: W/System.err(27217): at com.example.pestanasholacampus.InitActivity$2.onClick(InitActivity.java:68)
03-16 19:55:45.878: W/System.err(27217): at android.view.View.performClick(View.java:4442)
03-16 19:55:45.878: W/System.err(27217): at android.view.View$PerformClick.run(View.java:18473)
03-16 19:55:45.878: W/System.err(27217): at android.os.Handler.handleCallback(Handler.java:733)
03-16 19:55:45.878: W/System.err(27217): at android.os.Handler.dispatchMessage(Handler.java:95)
03-16 19:55:45.888: W/System.err(27217): at android.os.Looper.loop(Looper.java:136)
03-16 19:55:45.888: W/System.err(27217): at android.app.ActivityThread.main(ActivityThread.java:5105)
03-16 19:55:45.888: W/System.err(27217): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 19:55:45.888: W/System.err(27217): at java.lang.reflect.Method.invoke(Method.java:515)
03-16 19:55:45.888: W/System.err(27217): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
03-16 19:55:45.888: W/System.err(27217): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
03-16 19:55:45.898: W/System.err(27217): at dalvik.system.NativeStart.main(Native Method)
03-16 19:55:45.898: W/System.err(27217): Caused by: java.lang.VerifyError: com/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller
03-16 19:55:45.898: W/System.err(27217): at com.example.modelo.ObtencionTokenUsuario.doInBackground(ObtencionTokenUsuario.java:60)
03-16 19:55:45.898: W/System.err(27217): at com.example.modelo.ObtencionTokenUsuario.doInBackground(ObtencionTokenUsuario.java:1)
03-16 19:55:45.898: W/System.err(27217): at android.os.AsyncTask$2.call(AsyncTask.java:288)
03-16 19:55:45.908: W/System.err(27217): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-16 19:55:45.908: W/System.err(27217): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
03-16 19:55:45.908: W/System.err(27217): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-16 19:55:45.908: W/System.err(27217): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-16 19:55:45.908: W/System.err(27217): at java.lang.Thread.run(Thread.java:841)
I only see one rare thing in the buildPath. It only contains this:
I have read another posts with this problem but i dont know why does not works if the build path contains the projects.
All helps are welcome. Thanks.
My app crashes when I try to open in. The only change I've made was adding a .ogg file to my res/raw directory. It's really weird. I haven't added any codes or made any other changes. I just dragged a sound file into raw and compiled. It just keeps saying "unfortunately blah has stopped". Are there any obvious things I should check?
MainActivity.onCreate:
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.engine_layout);
myEngineView = (EngineView) findViewById(R.id.engineviewid);
myEngineView.setKeepScreenOn(true);
}
I get this in logcat:
E/AndroidRuntime(12560): FATAL EXCEPTION: main
E/AndroidRuntime(12560): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12560): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12560): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12560): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12560): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12560): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12560): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12560): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12560): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12560): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12560): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12560): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12560): ... 11 more
E/AppErrorDialog( 338): Failed to get ILowStorageHandle instance
E/Trace (12585): error opening trace file: No such file or directory (2)
E/AndroidRuntime(12585): FATAL EXCEPTION: main
E/AndroidRuntime(12585): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12585): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12585): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12585): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12585): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12585): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12585): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12585): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12585): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12585): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12585): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12585): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12585): ... 11 more
I am developing an app for measuring the signal strength. I have no errors in code, but when I run the app I get an error saying that "The application (app name) package name has stopped unexpectedly". Herewith I am attaching the xml file, java file and android manifest file. Kindly reply as soon as possible.
XML FILE
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity"
>
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="#string/ref"
android:textSize="30sp"
/>
<Button
android:id="#+id/bfind"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_below="#+id/textView1"
android:layout_centerHorizontal="true"
android:layout_marginTop="90dp"
android:text="#string/ref1"
android:layout_gravity="center"
android:textSize="25sp" />
<ProgressBar android:id="#+id/signalLevel" />
<TextView android:id="#+id/signalLevelInfo"/>
</RelativeLayout>
JAVA FILE
package com.signalstrength.gsmece;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.telephony.*;
import android.telephony.gsm.GsmCellLocation;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends Activity {
Button find;
TelephonyManager _telephonyManager;
GsmSignalStrengthListener _signalStrengthListener;
TextView display;
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
GsmCellLocation location = (GsmCellLocation) tm.getCellLocation();
String IMEI = tm.getDeviceId();
int lac = location.getLac();
int cid = location .getCid();
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
_telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
_signalStrengthListener = new GsmSignalStrengthListener();
find = (Button) findViewById(R.id.bfind);
display = (TextView) findViewById(R.id.textView1) ;
find.setOnClickListener(new View.OnClickListener()
{
#Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
display.setText("Calculating....");
}
});
}
public abstract class CellSignalStrength extends Object
{
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
MANIFEST FILE
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.signalstrength.gsmece"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-sdk
android:minSdkVersion="8"
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.signalatrength.gsmece.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
LOGCAT FILE
03-16 19:15:16.859: D/AndroidRuntime(277): Shutting down VM
03-16 19:15:16.859: W/dalvikvm(277): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
03-16 19:15:17.089: E/AndroidRuntime(277): FATAL EXCEPTION: main
03-16 19:15:17.089: E/AndroidRuntime(277): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.signalstrength.gsmece/com.signalstrength.gsmece.MainActivity}: java.lang.IllegalStateException: System services not available to Activities before onCreate()
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.os.Handler.dispatchMessage(Handler.java:99)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.os.Looper.loop(Looper.java:123)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-16 19:15:17.089: E/AndroidRuntime(277): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 19:15:17.089: E/AndroidRuntime(277): at java.lang.reflect.Method.invoke(Method.java:521)
03-16 19:15:17.089: E/AndroidRuntime(277): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-16 19:15:17.089: E/AndroidRuntime(277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-16 19:15:17.089: E/AndroidRuntime(277): at dalvik.system.NativeStart.main(Native Method)
03-16 19:15:17.089: E/AndroidRuntime(277): Caused by: java.lang.IllegalStateException: System services not available to Activities before onCreate()
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.Activity.getSystemService(Activity.java:3526)
03-16 19:15:17.089: E/AndroidRuntime(277): at com.signalstrength.gsmece.MainActivity.<init>(MainActivity.java:23)
03-16 19:15:17.089: E/AndroidRuntime(277): at java.lang.Class.newInstanceImpl(Native Method)
03-16 19:15:17.089: E/AndroidRuntime(277): at java.lang.Class.newInstance(Class.java:1429)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
03-16 19:15:17.089: E/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
03-16 19:15:17.089: E/AndroidRuntime(277): ... 11 more
03-16 19:15:25.850: I/Process(277): Sending signal. PID: 277 SIG: 9
03-16 19:15:50.780: D/AndroidRuntime(288): Shutting down VM
03-16 19:15:50.780: W/dalvikvm(288): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
03-16 19:15:50.810: E/AndroidRuntime(288): FATAL EXCEPTION: main
03-16 19:15:50.810: E/AndroidRuntime(288): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.signalstrength.gsmece/com.signalstrength.gsmece.MainActivity}: java.lang.IllegalStateException: System services not available to Activities before onCreate()
03-16 19:15:50.810: E/AndroidRuntime(288): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.os.Handler.dispatchMessage(Handler.java:99)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.os.Looper.loop(Looper.java:123)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-16 19:15:50.810: E/AndroidRuntime(288): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 19:15:50.810: E/AndroidRuntime(288): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-16 19:15:50.810: E/AndroidRuntime(288): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-16 19:15:50.810: E/AndroidRuntime(288): at dalvik.system.NativeStart.main(Native Method)
03-16 19:15:50.810: E/AndroidRuntime(288): Caused by: java.lang.IllegalStateException: System services not available to Activities before onCreate()
03-16 19:15:50.810: E/AndroidRuntime(288): at com.signalstrength.gsmece.MainActivity.<init>(MainActivity.java:23)
03-16 19:15:50.810: E/AndroidRuntime(288): at java.lang.Class.newInstanceImpl(Native Method)
03-16 19:15:50.810: E/AndroidRuntime(288): at java.lang.Class.newInstance(Class.java:1429)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
03-16 19:15:50.810: E/AndroidRuntime(288): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
03-16 19:15:50.810: E/AndroidRuntime(288): ... 11 more
03-16 19:20:50.879: I/Process(288): Sending signal. PID: 288 SIG: 9
Your manifest file has wrong package name when starting the main activity. Replace
android:name="com.signalatrength.gsmece.MainActivity"
with
android:name="com.signalstrength.gsmece.MainActivity"
You can't call getSystemServices until onCreate is called. Move the lines where you get a TelephonyManager and those that rely on it into onCreate
Trying to develop hello world, but getting force close error on emulator. thanks in advance
07-25 12:04:12.308: D/AndroidRuntime(277): Shutting down VM
07-25 12:04:12.308: W/dalvikvm(277): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
07-25 12:04:12.368: E/AndroidRuntime(277): FATAL EXCEPTION: main
07-25 12:04:12.368: E/AndroidRuntime(277): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.exampe.helloww/com.exampe.helloww.HelloActivity}: java.lang.ClassNotFoundException: com.exampe.helloww.HelloActivity in loader dalvik.system.PathClassLoader[/data/app/com.exampe.helloww-2.apk]
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.os.Handler.dispatchMessage(Handler.java:99)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.os.Looper.loop(Looper.java:123)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.reflect.Method.invokeNative(Native Method)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.reflect.Method.invoke(Method.java:521)
07-25 12:04:12.368: E/AndroidRuntime(277): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-25 12:04:12.368: E/AndroidRuntime(277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-25 12:04:12.368: E/AndroidRuntime(277): at dalvik.system.NativeStart.main(Native Method)
07-25 12:04:12.368: E/AndroidRuntime(277): Caused by: java.lang.ClassNotFoundException: com.exampe.helloww.HelloActivity in loader dalvik.system.PathClassLoader[/data/app/com.exampe.helloww-2.apk]
07-25 12:04:12.368: E/AndroidRuntime(277): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
07-25 12:04:12.368: E/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-25 12:04:12.368: E/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
07-25 12:04:12.368: E/AndroidRuntime(277): ... 11 more
07-25 12:04:17.158: I/Process(277): Sending signal. PID: 277 SIG: 9
the ClassNotFoundException is usually caused when you try to run your app on lower sdk version than the target sdk
Add your HelloActivity in Manifest file.Due to this your Activity is not found and you are getting ClassNotFoundException as
E/AndroidRuntime(277): Caused by: java.lang.ClassNotFoundException: com.exampe.helloww.HelloActivity
I created an app, on eclips, but when i try to run it is force close why?
logcat :
03-16 19:28:09.820: INFO/ActivityManager(439): Start proc com.soundboard.Jaribarh.LIL_SIDDI for activity com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord: pid=2621 uid=10020 gids={1015}
03-16 19:28:09.860: DEBUG/AK8973(415): Compass Start
03-16 19:28:09.860: DEBUG/Sensors(439): open_akm, fd=126
03-16 19:28:09.870: DEBUG/dalvikvm(2621): Debugger has detached; object registry had 1 entries
03-16 19:28:09.910: DEBUG/AndroidRuntime(2621): Shutting down VM
03-16 19:28:09.910: WARN/dalvikvm(2621): threadid=1: thread exiting with uncaught exception (group=0x40025a18)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): FATAL EXCEPTION: main
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.soundboard.Jaribarh.LIL_SIDDI/com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord}: java.lang.ClassNotFoundException: com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord in loader dalvik.system.PathClassLoader[/data/app/com.soundboard.Jaribarh.LIL_SIDDI-2.apk]
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2755)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2854)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.access$2300(ActivityThread.java:136)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2179)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.os.Handler.dispatchMessage(Handler.java:99)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.os.Looper.loop(Looper.java:143)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.main(ActivityThread.java:5068)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.reflect.Method.invoke(Method.java:521)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at dalvik.system.NativeStart.main(Native Method)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): Caused by: java.lang.ClassNotFoundException: com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord in loader dalvik.system.PathClassLoader[/data/app/com.soundboard.Jaribarh.LIL_SIDDI-2.apk]
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.Instrumentation.newActivity(Instrumentation.java:1034)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): ... 11 more
03-16 19:28:09.920: WARN/ActivityManager(439): Force finishing activity com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord
03-16 19:28:10.420: WARN/ActivityManager(439): Activity pause timeout for HistoryRecord{48894070 com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord}
It looks like the class com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord doesn't exist. Possibly a misspelling of soundboard?
This is the important line from your log:
java.lang.ClassNotFoundException: com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord
Is there a typo in the class name, or is it possible that this Activity is not declared in the Manifest?