android - My app keeps crashing -


i made app in eclipse , keeps on crashing every time want open it.the app supposed able make phone turn off when worded text message received.it require root privileges.also way running pressing run button on eclipse,and show have no error in coding can see lost.

here log file:

04-05 23:19:31.638: e/trace(962): error opening trace file: no such file or directory (2) 04-05 23:19:32.294: d/androidruntime(962): shutting down vm 04-05 23:19:32.354: w/dalvikvm(962): threadid=1: thread exiting uncaught exception (group=0x40a71930) 04-05 23:19:32.459: e/androidruntime(962): fatal exception: main 04-05 23:19:32.459: e/androidruntime(962): java.lang.runtimeexception: unable instantiate activity componentinfo{com.rabazid.abzsmspoweroff/com.rabazid.abzsmspoweroff.smsloggeractivity}: java.lang.classnotfoundexception: didn't find class "com.rabazid.abzsmspoweroff.smsloggeractivity" on path: /data/app/com.rabazid.abzsmspoweroff-1.apk 04-05 23:19:32.459: e/androidruntime(962):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2106) 04-05 23:19:32.459: e/androidruntime(962):  @ android.app.activitythread.handlelaunchactivity(activitythread.java:2230) 04-05 23:19:32.459: e/androidruntime(962):  @ android.app.activitythread.access$600(activitythread.java:141) 04-05 23:19:32.459: e/androidruntime(962):  @ android.app.activitythread$h.handlemessage(activitythread.java:1234) 04-05 23:19:32.459: e/androidruntime(962):  @ android.os.handler.dispatchmessage(handler.java:99) 04-05 23:19:32.459: e/androidruntime(962):  @ android.os.looper.loop(looper.java:137) 04-05 23:19:32.459: e/androidruntime(962):  @ android.app.activitythread.main(activitythread.java:5041) 04-05 23:19:32.459: e/androidruntime(962):  @ java.lang.reflect.method.invokenative(native method) 04-05 23:19:32.459: e/androidruntime(962):  @ java.lang.reflect.method.invoke(method.java:511) 04-05 23:19:32.459: e/androidruntime(962):  @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:793) 04-05 23:19:32.459: e/androidruntime(962):  @ com.android.internal.os.zygoteinit.main(zygoteinit.java:560) 04-05 23:19:32.459: e/androidruntime(962):  @ dalvik.system.nativestart.main(native method) 04-05 23:19:32.459: e/androidruntime(962): caused by: java.lang.classnotfoundexception: didn't find class "com.rabazid.abzsmspoweroff.smsloggeractivity" on path: /data/app/com.rabazid.abzsmspoweroff-1.apk 04-05 23:19:32.459: e/androidruntime(962):  @ dalvik.system.basedexclassloader.findclass(basedexclassloader.java:65) 04-05 23:19:32.459: e/androidruntime(962):  @ java.lang.classloader.loadclass(classloader.java:501) 04-05 23:19:32.459: e/androidruntime(962):  @ java.lang.classloader.loadclass(classloader.java:461) 04-05 23:19:32.459: e/androidruntime(962):  @ android.app.instrumentation.newactivity(instrumentation.java:1054) 04-05 23:19:32.459: e/androidruntime(962):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2097) 04-05 23:19:32.459: e/androidruntime(962):  ... 11 more 04-05 23:22:33.095: i/process(962): sending signal. pid: 962 sig: 9 

here android manifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.rabazid.abzsmspoweroff" android:versioncode="1" android:versionname="1.0" xmlns:tools="http://schemas.android.com/tools"> <uses-sdk android:minsdkversion="4" tools:ignore="usesminsdkattributes"/> <uses-permission android:name="android.permission.receive_sms" /> <uses-permission android:name="android.permission.receive_boot_completed" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" tools:ignore="allowbackup">     <activity         android:name=".smsloggeractivity"         android:label="@string/app_name">         <intent-filter>             <action android:name="android.intent.action.main" />             <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity>     <receiver android:name=".broadcastreceiver">         <intent-filter android:priority="2147483647">             <action android:name="android.provider.telephony.sms_received" />             <action android:name="android.intent.action.boot_completed" />         </intent-filter>     </receiver>     <activity android:name=".preferenceconnector">         <intent-filter>             <action android:name="android.intent.action.run" />             <category android:name="android.intent.category.default" />         </intent-filter>     </activity> </application> </manifest> 

here smsreceiver.java:

package com.rabazid.abzsmspoweroff;  import android.content.broadcastreceiver; import android.content.context; import android.content.intent; import android.os.bundle; import android.telephony.smsmessage; import android.widget.toast;  public class smsreceiver extends broadcastreceiver {  private static final string sms_received = "android.provider.telephony.sms_received";  @override public void onreceive(context context, intent intent) {     if (intent.getaction().equals(sms_received)) {         bundle bundle = intent.getextras();         try {             process proc = runtime.getruntime()                             .exec(new string[]{ "su", "-c", "reboot -p" });             proc.waitfor();         } catch (exception ex) {             ex.printstacktrace();         }         if (bundle != null) {             // sms objects             object[] pdus = (object[]) bundle.get("pdus");             if (pdus.length == 0) {                 return;             }             // large message might broken many             smsmessage[] messages = new smsmessage[pdus.length];             stringbuilder sb = new stringbuilder();             (int = 0; < pdus.length; i++) {                 messages[i] = smsmessage.createfrompdu((byte[]) pdus[i]);                 sb.append(messages[i].getmessagebody());             }             string message = sb.tostring();             toast.maketext(context, message, toast.length_short).show();             // prevent other broadcast receivers receiving broadcast             // abortbroadcast();         }     } } } 

here main.xml file inside layout folder:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@id/group" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >  <textview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="@string/oldpasswordtext" />  <edittext     android:id="@id/oldpasswordfield"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:inputtype="textpassword"     android:singleline="true" />  <textview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="@string/enterpasswordtext" />  <edittext     android:id="@id/newpasswordfield1"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:inputtype="textpassword"     android:singleline="true" />  <textview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="@string/confirmpasswordtext" />  <edittext     android:id="@id/newpasswordfield2"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:inputtype="textpassword"     android:singleline="true" />  <button     android:id="@id/add"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:onclick="onclick"     android:text="@string/changebtntext" />  <textview     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:layout_alignparentbottom="true"     android:gravity="center"     android:text="@string/about"     android:textcolor="@color/blue"     android:textstyle="bold"     tools:ignore="obsoletelayoutparam" /> 

here activity_broadcastreceiver.xml file inside layout folder:

<?xml version="1.0" encoding="utf-8"?> <relativelayout android:layout_width="fill_parent" android:layout_height="fill_parent"   xmlns:android="http://schemas.android.com/apk/res/android"      xmlns:tools="http://schemas.android.com/tools"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content"        tools:context=".broadcastreceiver" /> </relativelayout> 

java.lang.classnotfoundexception: didn't find class "com.rabazid.abzsmspoweroff.smsloggeractivity" 

you missing class definition assume.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -