java.lang.RuntimeException: Unable to instantiate activity

Put your problem here if it does not fit any of the other categories.

java.lang.RuntimeException: Unable to instantiate activity

Postby deepthibajaj » Tue May 18, 2010 11:37 am

i have added an external module.and im trying to switch from settings to this external module using intent..but im getting
Sorry
The application Settings(process com.android.settings)
has stopped unexpectedly
please try again.
Force close

In Settings Manifest file i hav added

<!-- Wimax Settings -->

<activity android:name=".wimax.WimaxSettings"
android:label="@string/wimax_settings_title">
<uses-library android:name="libWimaxjni.so" />
<intent-filter>
<action android:name="com.android.settings.intent.action.WIMAX" />
<action android:name="com.android.settings.WIMAX_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

and in settings settings/src/com/android/settings/wimax i hav written WimaxSettings.java class

package com.android.settings;

import com.android.settings.R;

import android.os.Bundle;
import android.content.Intent;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

public class WimaxSettings extends PreferenceActivity
{

private static final int MENU_ID_INIT = Menu.FIRST;
private static final int MENU_ID_CONNECT = Menu.FIRST + 1;
private static final int MENU_ID_DISABLE= Menu.FIRST + 2;
private static final int MENU_ID_DETACH= Menu.FIRST + 3;
public static final String ACTION_WIMAX="com.android.settings.intent.action.WIMAX";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Intent intent = new Intent(Intent.ACTION_WIMAX);
System.out.println("Bfre Intent");
Intent intent=new Intent();
intent.setAction(ACTION_WIMAX);
intent.setClassName("com.Wimax","com.Wimax.Wimax");
sendBroadcast(intent);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);

menu.add(0, MENU_ID_INIT, 0, R.string.wimax_init);
menu.add(0, MENU_ID_CONNECT, 0, R.string.wimax_connect);
menu.add(0, MENU_ID_DISABLE, 0,R.string.wimax_disable);
menu.add(0, MENU_ID_DETACH, 0 ,R.string.wimax_detach);

return true;
}
}

i have got the following logcat when iam clicking Wimax Settings on Settings

I/ActivityManager( 562): Start proc com.android.calendar for broadcast com.android.providers.calendar/.CalendarReceiver: pid=659 uid=10002 gids={3003}
D/dalvikvm( 646): GC freed 1327 objects / 91800 bytes in 934ms
I/ActivityThread( 659): Publishing provider calendar: com.android.providers.calendar.CalendarProvider
W/ActivityManager( 562): Unable to start service Intent { action=android.accounts.IAccountsService comp={com.google.android.googleapps/com.google.android.googleapps.GoogleLoginService} }: not found
W/AccountMonitor( 659): Couldn't connect to Intent { action=android.accounts.IAccountsService comp={com.google.android.googleapps/com.google.android.googleapps.GoogleLoginService} } (Missing service?)
I/ActivityManager( 562): Start proc com.android.alarmclock for broadcast com.android.alarmclock/.AlarmInitReceiver: pid=670 uid=10008 gids={}
I/ActivityThread( 670): Publishing provider com.android.alarmclock: com.android.alarmclock.AlarmProvider
I/ActivityManager( 562): Start proc com.android.mms for broadcast com.android.mms/.transaction.MmsSystemEventReceiver: pid=681 uid=10009 gids={3003}
I/ActivityManager( 562): Stopping service: com.android.providers.downloads/.DownloadService
D/dalvikvm( 562): GREF has increased to 201
D/MediaScannerService( 646): start scanning volume internal
D/dalvikvm( 604): GC freed 1016 objects / 51960 bytes in 355ms
I/ActivityManager( 562): Stopping service: com.android.mms/.transaction.SmsReceiverService
D/MediaScanner( 646): opendir /system/media/ failed, errno: 2
D/MediaScanner( 646): prescan time: 2474ms
D/MediaScanner( 646): scan time: 66ms
D/MediaScanner( 646): postscan time: 1ms
D/MediaScanner( 646): total time: 2541ms
D/MediaScannerService( 646): done scanning volume internal
I/ActivityManager( 562): Stopping service: com.android.providers.media/.MediaScannerService
I/ActivityManager( 562): Starting activity: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x10200000 comp={com.android.settings/com.android.settings.Settings} }
I/ActivityManager( 562): Start proc com.android.settings for activity com.android.settings/.Settings: pid=696 uid=1000 gids={3002, 3001, 3003}
D/dalvikvm( 537): GC freed 277 objects / 10392 bytes in 664ms
D/dalvikvm( 537): GC freed 50 objects / 2144 bytes in 378ms
D/dalvikvm( 537): GC freed 2 objects / 48 bytes in 591ms
W/IInputConnectionWrapper( 604): showStatusIcon on inactive InputConnection
I/ActivityManager( 562): Displayed activity com.android.settings/.Settings: 4615 ms
I/ARMAssembler( 562): generated scanline__00000077:03545404_00000A04_00000000 [ 29 ipp] (51 ins) at [0x225d10:0x225ddc] in 8583248 ns
I/ActivityManager( 562): Starting activity: Intent { action=android.intent.action.MAIN comp={com.android.settings/com.android.settings.wimax.WimaxSettings} }
D/AndroidRuntime( 696): Shutting down VM
W/dalvikvm( 696): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime( 696): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 696): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.settings/com.android.settings.wimax.WimaxSettings}: java.lang.ClassNotFoundException: com.android.settings.wimax.WimaxSettings in loader dalvik.system.PathClassLoader@435e0e10
E/AndroidRuntime( 696): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2194)
E/AndroidRuntime( 696): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
E/AndroidRuntime( 696): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
E/AndroidRuntime( 696): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
E/AndroidRuntime( 696): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 696): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 696): at android.app.ActivityThread.main(ActivityThread.java:3948)
E/AndroidRuntime( 696): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 696): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 696): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 696): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
E/AndroidRuntime( 696): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 696): Caused by: java.lang.ClassNotFoundException: com.android.settings.wimax.WimaxSettings in loader dalvik.system.PathClassLoader@435e0e10
E/AndroidRuntime( 696): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
E/AndroidRuntime( 696): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/AndroidRuntime( 696): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/AndroidRuntime( 696): at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
E/AndroidRuntime( 696): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2186)
E/AndroidRuntime( 696): ... 11 more
I/Process ( 562): Sending signal. PID: 696 SIG: 3
I/dalvikvm( 696): threadid=7: reacting to signal 3
E/ActivityThread( 562): Failed to find provider info for android.server.checkin
E/Checkin ( 562): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes
I/dalvikvm( 696): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 696): Sending signal. PID: 696 SIG: 9
I/ActivityManager( 562): Process com.android.settings (pid 696) has died.
I/WindowManager( 562): WIN DEATH: Window{436e77c0 com.android.settings/com.android.settings.Settings paused=false}
I/ActivityManager( 562): Start proc com.android.settings for activity com.android.settings/.Settings: pid=703 uid=1000 gids={3002, 3001, 3003}
W/InputManagerService( 562): Got RemoteException sending setActive(false) notification to pid 696 uid 1000
I/ActivityManager( 562): Displayed activity com.android.settings/.Settings: 3521 ms
D/dalvikvm( 646): GC freed 1111 objects / 79008 bytes in 201ms
D/dalvikvm( 602): GC freed 767 objects / 65904 bytes in 209ms
D/dalvikvm( 681): GC freed 1983 objects / 119592 bytes in 268ms
D/dalvikvm( 604): GC freed 664 objects / 32080 bytes in 210ms

can anyone please help me out to solve the above error.is there anyother way to switch from settings to external please let me know.thanks in advance..
deepthibajaj
Once Poster
Once Poster
 
Posts: 1
Joined: Tue May 18, 2010 11:10 am

Top

Re: java.lang.RuntimeException: Unable to instantiate activi

Postby kec6227 » Tue May 18, 2010 3:28 pm

EDIT: Nevermind, I looked more closely at the stack trace and what I thought it was doesn't appear to be the case. Sorry.
kec6227
Developer
Developer
 
Posts: 30
Joined: Fri Jul 24, 2009 7:31 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 22 guests