It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
My app was working well but suddenly in emulator my app is crashed but i didn't made any changes in the code
for reference
04-12 09:41:05.079: W/ActivityManager(879): Activity destroy timeout for ActivityRecord{b5aaca48 com.bostonmediatech.gayatrimantra/.Main}
04-12 09:41:05.079: W/ActivityManager(879): Activity destroy timeout for ActivityRecord{b5c6ea90 com.bostonmediatech.gayatrimantra/.Home}
04-12 09:41:06.449: I/ActivityManager(879): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.bostonmediatech.gayatrimantra/.Main} from pid 1008
04-12 09:41:06.449: W/WindowManager(879): Failure taking screenshot for (180x300) to layer 21005
04-12 09:41:06.459: D/dalvikvm(1466): Not late-enabling CheckJNI (already on)
04-12 09:41:06.459: D/dalvikvm(786): GC_EXPLICIT freed 35K, 4% free 8982K/9283K, paused 0ms+4ms
04-12 09:41:06.470: D/dalvikvm(786): GC_EXPLICIT freed <1K, 4% free 8982K/9283K, paused 1ms+0ms
04-12 09:41:06.470: D/dalvikvm(786): GC_EXPLICIT freed <1K, 4% free 8982K/9283K, paused 0ms+0ms
04-12 09:41:06.470: I/ActivityManager(879): Start proc com.bostonmediatech.gayatrimantra for activity com.bostonmediatech.gayatrimantra/.Main: pid=1466 uid=10039 gids={}
04-12 09:41:06.479: W/NetworkManagementSocketTagger(879): setKernelCountSet(10039, 1) failed with errno -2
04-12 09:41:06.479: D/dalvikvm(1466): GC_FOR_ALLOC freed 67K, 3% free 9021K/9283K, paused 0ms
04-12 09:41:06.479: I/dalvikvm-heap(1466): Grow heap (frag case) to 9.450MB for 614412-byte allocation
04-12 09:41:06.509: D/dalvikvm(1466): GC_CONCURRENT freed 0K, 4% free 9621K/9927K, paused 0ms+1ms
04-12 09:41:06.571: D/gralloc_goldfish(1466): Emulator without GPU emulation detected.
04-12 09:41:06.619: I/ActivityManager(879): Displayed com.bostonmediatech.gayatrimantra/.Main: +170ms (total +12s176ms)
04-12 09:41:06.629: W/InputManagerService(879): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#b5c2dfa0 (uid=10012 pid=1008)
04-12 09:41:07.207: W/NetworkManagementSocketTagger(879): setKernelCountSet(10012, 0) failed with errno -2
04-12 09:41:07.789: W/ThrottleService(879): unable to find stats for iface rmnet0
04-12 09:41:07.789: E/ThrottleService(879): Error reading data file
04-12 09:41:08.689: I/ActivityManager(879): START {act=com.bostonmediatech.gayatrimantra.CLEARSCREEN cmp=com.bostonmediatech.gayatrimantra/.Home} from pid 1466
04-12 09:41:08.689: W/WindowManager(879): Failure taking screenshot for (180x300) to layer 21010
04-12 09:41:08.699: D/dalvikvm(1466): GC_FOR_ALLOC freed 4K, 3% free 9640K/9927K, paused 3ms
04-12 09:41:08.699: I/dalvikvm-heap(1466): Grow heap (frag case) to 10.054MB for 614412-byte allocation
04-12 09:41:08.719: D/dalvikvm(1466): GC_CONCURRENT freed <1K, 4% free 10240K/10567K, paused 0ms+0ms
04-12 09:41:08.731: D/AndroidRuntime(1466): Shutting down VM
04-12 09:41:08.731: W/dalvikvm(1466): threadid=1: thread exiting with uncaught exception (group=0xb508f180)
04-12 09:41:08.731: E/AndroidRuntime(1466): FATAL EXCEPTION: main
04-12 09:41:08.731: E/AndroidRuntime(1466): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bostonmediatech.gayatrimantra/com.bostonmediatech.gayatrimantra.Home}: android.view.InflateException: Binary XML file line #8: Error inflating class android.widget.ListView
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.os.Handler.dispatchMessage(Handler.java:99)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.os.Looper.loop(Looper.java:137)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-12 09:41:08.731: E/AndroidRuntime(1466): at java.lang.reflect.Method.invokeNative(Native Method)
04-12 09:41:08.731: E/AndroidRuntime(1466): at java.lang.reflect.Method.invoke(Method.java:511)
04-12 09:41:08.731: E/AndroidRuntime(1466): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-12 09:41:08.731: E/AndroidRuntime(1466): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-12 09:41:08.731: E/AndroidRuntime(1466): at dalvik.system.NativeStart.main(Native Method)
04-12 09:41:08.731: E/AndroidRuntime(1466): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class android.widget.ListView
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
04-12 09:41:08.731: E/AndroidRuntime(1466): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
04-12 09:41:08.731: E/AndroidRuntime(1466): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.Activity.setContentView(Activity.java:1835)
04-12 09:41:08.731: E/AndroidRuntime(1466): at com.bostonmediatech.gayatrimantra.Home.onCreate(Home.java:26)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.Activity.performCreate(Activity.java:4465)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-12 09:41:08.731: E/AndroidRuntime(1466): ... 11 more
04-12 09:41:08.731: E/AndroidRuntime(1466): Caused by: java.lang.reflect.InvocationTargetException
04-12 09:41:08.731: E/AndroidRuntime(1466): at java.lang.reflect.Constructor.constructNative(Native Method)
04-12 09:41:08.731: E/AndroidRuntime(1466): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
04-12 09:41:08.731: E/AndroidRuntime(1466): ... 24 more
04-12 09:41:08.731: E/AndroidRuntime(1466): Caused by: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.widget.AdapterView.setOnClickListener(AdapterView.java:761)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.View.<init>(View.java:3018)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.view.ViewGroup.<init>(ViewGroup.java:385)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.widget.AdapterView.<init>(AdapterView.java:234)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.widget.AbsListView.<init>(AbsListView.java:734)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.widget.ListView.<init>(ListView.java:141)
04-12 09:41:08.731: E/AndroidRuntime(1466): at android.widget.ListView.<init>(ListView.java:137)
04-12 09:41:08.731: E/AndroidRuntime(1466): ... 27 more
04-12 09:41:08.731: W/ActivityManager(879): Force finishing activity com.bostonmediatech.gayatrimantra/.Home
04-12 09:41:08.759: D/dalvikvm(879): GC_CONCURRENT freed 347K, 12% free 11209K/12615K, paused 0ms+1ms
04-12 09:41:09.199: I/Process(879): Sending signal. PID: 1466 SIG: 3
04-12 09:41:09.199: I/dalvikvm(1466): threadid=3: reacting to signal 3
04-12 09:41:09.199: I/dalvikvm(1466): Wrote stack traces to '/data/anr/traces.txt'
04-12 09:41:09.239: W/ActivityManager(879): Activity pause timeout for ActivityRecord{b5c736d0 com.bostonmediatech.gayatrimantra/.Home}
04-12 09:41:09.239: I/Process(879): Sending signal. PID: 1466 SIG: 3
04-12 09:41:09.239: I/dalvikvm(1466): threadid=3: reacting to signal 3
04-12 09:41:09.239: I/dalvikvm(1466): Wrote stack traces to '/data/anr/traces.txt'
04-12 09:41:09.249: W/NetworkManagementSocketTagger(879): setKernelCountSet(10012, 1) failed with errno -2
04-12 09:41:09.301: W/NetworkManagementSocketTagger(879): setKernelCountSet(10039, 0) failed with errno -2
04-12 09:41:09.323: D/dalvikvm(1008): GC_FOR_ALLOC freed 2466K, 29% free 17654K/24647K, paused 5ms
04-12 09:41:09.499: D/dalvikvm(1008): GC_CONCURRENT freed 1766K, 28% free 17895K/24647K, paused 0ms+0ms
04-12 09:41:09.529: D/dalvikvm(1008): GC_FOR_ALLOC freed 1568K, 26% free 18277K/24647K, paused 17ms
04-12 09:41:09.531: D/dalvikvm(1008): GC_CONCURRENT freed 310K, 26% free 18312K/24647K, paused 1ms+1ms
04-12 09:41:10.199: I/Process(1466): Sending signal. PID: 1466 SIG: 9
04-12 09:41:10.199: I/WindowManager(879): WIN DEATH: Window{b5be9ae0 com.bostonmediatech.gayatrimantra/com.bostonmediatech.gayatrimantra.Main paused=true}
04-12 09:41:10.199: I/ActivityManager(879): Process com.bostonmediatech.gayatrimantra (pid 1466) has died.
04-12 09:41:10.269: W/InputManagerService(879): Got RemoteException sending setActive(false) notification to pid 1466 uid 10039
04-12 09:41:19.301: W/ActivityManager(879): Activity destroy timeout for ActivityRecord{b5c0f358 com.bostonmediatech.gayatrimantra/.Main}
04-12 09:41:19.301: W/ActivityManager(879): Activity destroy timeout for ActivityRecord{b5c736d0 com.bostonmediatech.gayatrimantra/.Home}
java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
This is the exception, occured because you have set onClickListener for ListView but you should set onItemClickListener.
And also post your code to identify other issues.
And also make sure that it is of AdapterView.OnItemClickListener()
Remove onClick or onItemClick from layout
Related
I've been trying to turn on an Accessibility Service using Android's. I run an emulator using Android Studio (Nexus S API 19, armabi-v7). I'm able to open the accessibility settings when the emulator is running. (By clicking on the circled submenu)
Setting Screen with Accessibility Sub-Menu highlighted
Yet when I run try to attach monkeyrunner by opening an interactive monkeyrunner terminal and running:
>> from android.com.monkeyrunner import MonkeyRunner, MonkeyDevice
>> d = MonkeyRunner.waitForConnection()
I'm unable to get navigate to the accessibility settings screen and get the error message
Result of selecting accessibility sub-menu from settings when MonkeyDevice is attached
as soon as I detach the monkeyDevice, I'm able to get to the accessibility settings screen again. Any idea what could cause it?
snippet from the logs when there's an error:
##Logs from Failure ## I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings} from pid 519 ... I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 751
...
D/SubSettings( 751): Launching fragment com.android.settings.accessibility.AccessibilitySettings ... E/AndroidRuntime( 751): FATAL EXCEPTION: main
E/AndroidRuntime( 751): Process: com.android.settings, PID: 751
E/AndroidRuntime( 751): java.lang.RuntimeException: Unable to resume activity {com.android.settings/com.android.settings.SubSettings}: java.lang.NullPointerException
E/AndroidRuntime( 751): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2774)
E/AndroidRuntime( 751): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2803)
E/AndroidRuntime( 751): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2238)
E/AndroidRuntime( 751): at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 751): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 751): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 751): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 751): at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 751): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 751): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 751): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 751): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime( 751): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 751): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 751): at com.android.settings.accessibility.AccessibilitySettings.loadInstalledServices(AccessibilitySettings.java:641)
E/AndroidRuntime( 751): at com.android.settings.accessibility.AccessibilitySettings.onResume(AccessibilitySettings.java:214)
E/AndroidRuntime( 751): at android.app.Fragment.performResume(Fragment.java:1743)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:924)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1044)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:1863)
E/AndroidRuntime( 751): at android.app.Activity.performResume(Activity.java:5320)
E/AndroidRuntime( 751): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2764)
E/AndroidRuntime( 751): ... 12 more
W/ActivityManager( 357): Force finishing activity com.android.settings/.SubSettings
W/ActivityManager( 357): Force finishing activity com.android.settings/.Settings ... W/ActivityManager( 357): Activity pause timeout for ActivityRecord{b3ea9e08 u0 com.android.settings/.SubSettings t2 f}
There seems to be a NullPointer exception, but I don't know what could cause that
##Log Snippet Without Failure I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings} from pid 519
I/ActivityManager( 357): Start proc com.android.settings for activity com.android.settings/.Settings: pid=1095 uid=1000 gids={41000, 1028, 1015, 3002, 3001, 3003}
D/dalvikvm( 59): GC_EXPLICIT freed 40K, 5% free 2777K/2900K, paused 15ms+3ms, total 96ms
D/dalvikvm( 59): GC_EXPLICIT freed <1K, 5% free 2777K/2900K, paused 3ms+14ms, total 67ms
D/dalvikvm( 59): GC_EXPLICIT freed <1K, 5% free 2777K/2900K, paused 7ms+14ms, total 76ms
D/dalvikvm( 1095): GC_FOR_ALLOC freed 118K, 7% free 2987K/3188K, paused 35ms, total 37ms
I/dalvikvm-heap( 1095): Grow heap (frag case) to 3.602MB for 635812-byte allocation
D/dalvikvm( 1095): GC_FOR_ALLOC freed 3K, 6% free 3605K/3812K, paused 44ms, total 44ms
D/dalvikvm( 1095): GC_CONCURRENT freed <1K, 6% free 3605K/3812K, paused 4ms+2ms, total 53ms
E/BluetoothAdapter( 1095): Bluetooth binder is null
D/dalvikvm( 1095): GC_CONCURRENT freed 209K, 8% free 3793K/4088K, paused 2ms+16ms, total 65ms
D/ ( 1095): HostConnection::get() New Host Connection established 0xb82ef4c0, tid 1095
W/EGL_emulation( 1095): eglSurfaceAttrib not implemented
D/OpenGLRenderer( 1095): Enabling debug mode 0
I/ActivityManager( 357): Displayed com.android.settings/.Settings:
+2s599ms
D/dalvikvm( 1095): GC_CONCURRENT freed 124K, 5% free 4057K/4268K, paused 15ms+5ms, total 101ms
I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 1095
D/SubSettings( 1095): Launching fragment com.android.settings.accessibility.AccessibilitySettings
W/EGL_emulation( 1095): eglSurfaceAttrib not implemented
D/dalvikvm( 1095): GC_CONCURRENT freed 223K, 7% free 4267K/4576K, paused 20ms+65ms, total 345ms
I/Choreographer( 1095): Skipped 120 frames! The application may be doing too much work on its main thread.
I/ActivityManager( 357): Displayed com.android.settings/.SubSettings:
+3s235ms
08-07 11:18:38.353: D/dalvikvm(15215): GC_FOR_ALLOC freed 83K, 6% free 12813K/13599K, paused 21ms
08-07 11:18:38.363: I/dalvikvm-heap(15215): Grow heap (frag case) to 15.352MB for 2908176-byte allocation
08-07 11:18:38.393: D/dalvikvm(15215): GC_FOR_ALLOC freed 1K, 6% free 15652K/16483K, paused 12ms
08-07 11:18:38.413: D/dalvikvm(15215): GC_CONCURRENT freed <1K, 6% free 15652K/16483K, paused 2ms+2ms
08-07 11:18:38.443: D/dalvikvm(15215): GC_FOR_ALLOC freed <1K, 6% free 15652K/16483K, paused 15ms
08-07 11:18:38.443: I/dalvikvm-heap(15215): Grow heap (frag case) to 20.281MB for 5169196-byte allocation
08-07 11:18:38.463: D/dalvikvm(15215): GC_FOR_ALLOC freed 0K, 4% free 20700K/21539K, paused 13ms
08-07 11:18:38.483: D/dalvikvm(15215): GC_CONCURRENT freed <1K, 4% free 20700K/21539K, paused 2ms+2ms
08-07 11:18:38.543: D/AndroidRuntime(15215): Shutting down VM
08-07 11:18:38.543: W/dalvikvm(15215): threadid=1: thread exiting with uncaught exception (group=0x40ab2210)
08-07 11:18:38.553: E/AndroidRuntime(15215): FATAL EXCEPTION: main
08-07 11:18:38.553: E/AndroidRuntime(15215): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.demo/com.example.demo.MainActivity}: java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.Button
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.ActivityThread.access$600(ActivityThread.java:127)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.os.Handler.dispatchMessage(Handler.java:99)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.os.Looper.loop(Looper.java:137)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.ActivityThread.main(ActivityThread.java:4441)
08-07 11:18:38.553: E/AndroidRuntime(15215): at java.lang.reflect.Method.invokeNative(Native Method)
08-07 11:18:38.553: E/AndroidRuntime(15215): at java.lang.reflect.Method.invoke(Method.java:511)
08-07 11:18:38.553: E/AndroidRuntime(15215): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
08-07 11:18:38.553: E/AndroidRuntime(15215): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
08-07 11:18:38.553: E/AndroidRuntime(15215): at dalvik.system.NativeStart.main(Native Method)
08-07 11:18:38.553: E/AndroidRuntime(15215): Caused by: java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.Button
08-07 11:18:38.553: E/AndroidRuntime(15215): at com.example.demo.MainActivity.onCreate(MainActivity.java:16)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.Activity.performCreate(Activity.java:4465)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
08-07 11:18:38.553: E/AndroidRuntime(15215): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
i can run simple graphical-layout but whe i try to add some code onclick or any other its show me these errors. i deleted api 20 from sdk manager and trying to compile in api17. HOW TO SOLVE THESE ERRORS??????
this exception says that you was cast ImageView to Button .
Caused by: java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.Button
Please change (Button) To (ImageView) at Line No 16 in MainActivity.java
I have made made 2 xml files that have identical widgets. First file (main) the widgets are arranged in a Relative layout and the second (testgrid2) the widgets are in a TableLayout. The first xml file works fine and app runs. The second xml file I created so I can test before I replace it with the original (main). when I test the second (testgrids)it crashes but I cannot understand the log cat errors it is generating.
The only changes I make to test is in the set Content view.
setContentView(R.layout.main);
and testing
setContentView(R.layout.testgrid2);
Logcat
01-05 13:14:38.790: D/dalvikvm(8152): GC_FOR_ALLOC freed 63K, 1% free 8906K/8992K, paused 16ms, total 16ms
01-05 13:14:38.790: I/dalvikvm-heap(8152): Grow heap (frag case) to 9.428MB for 746512-byte allocation
01-05 13:14:38.810: D/dalvikvm(8152): GC_FOR_ALLOC freed <1K, 1% free 9635K/9724K, paused 15ms, total 15ms
01-05 13:14:38.830: D/dalvikvm(8152): GC_FOR_ALLOC freed <1K, 1% free 9635K/9724K, paused 11ms, total 11ms
01-05 13:14:38.840: I/dalvikvm-heap(8152): Grow heap (frag case) to 12.276MB for 2986000-byte allocation
01-05 13:14:38.850: D/dalvikvm(8152): GC_FOR_ALLOC freed 0K, 1% free 12551K/12644K, paused 11ms, total 11ms
01-05 13:14:38.931: D/TAG(8152): Size Pre 600
01-05 13:14:38.941: D/TAG(8152): File SET 600
01-05 13:14:38.941: D/TAG(8152): BT true
01-05 13:14:38.941: D/TAG(8152): CON true
01-05 13:14:38.941: W/BluetoothAdapter(8152): getBluetoothService() called with no BluetoothManagerCallback
01-05 13:14:38.941: D/BluetoothSocket(8152): connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[41]}
01-05 13:14:39.411: D/AndroidRuntime(8152): Shutting down VM
01-05 13:14:39.411: W/dalvikvm(8152): threadid=1: thread exiting with uncaught exception (group=0x4159a700)
01-05 13:14:39.421: E/AndroidRuntime(8152): FATAL EXCEPTION: main
01-05 13:14:39.421: E/AndroidRuntime(8152): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.simplergb/com.example.simplergb.SimpleRGB_Main}: java.lang.NullPointerException
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.os.Handler.dispatchMessage(Handler.java:99)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.os.Looper.loop(Looper.java:137)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.ActivityThread.main(ActivityThread.java:5103)
01-05 13:14:39.421: E/AndroidRuntime(8152): at java.lang.reflect.Method.invokeNative(Native Method)
01-05 13:14:39.421: E/AndroidRuntime(8152): at java.lang.reflect.Method.invoke(Method.java:525)
01-05 13:14:39.421: E/AndroidRuntime(8152): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
01-05 13:14:39.421: E/AndroidRuntime(8152): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-05 13:14:39.421: E/AndroidRuntime(8152): at dalvik.system.NativeStart.main(Native Method)
01-05 13:14:39.421: E/AndroidRuntime(8152): Caused by: java.lang.NullPointerException
01-05 13:14:39.421: E/AndroidRuntime(8152): at com.example.simplergb.SimpleRGB_Main.onCreate(SimpleRGB_Main.java:1429)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.Activity.performCreate(Activity.java:5133)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
01-05 13:14:39.421: E/AndroidRuntime(8152): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
01-05 13:14:39.421: E/AndroidRuntime(8152): ... 11 more
Here:
Caused by: java.lang.NullPointerException
at com.example.simplergb.SimpleRGB_Main.onCreate(SimpleRGB_Main.java:1429)
So fix your NPE in SimpleRGB_Main.java line 1429
I've made a simple Android app that's trying to open a URL (any URL with input will do) on a click of a button.
The code I use is this :
btnTest = (Button)findViewById(R.id.btnTest);
btnTest.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
HelloActivity.this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")));
}
});
The problem is that in Android Emulator running Platform 4.0.3, the emulator is crashed everytime I try to input text using soft keyboard into the web. This problem doesn't occur in Emulator running Platform 2.3.3. I've tried many sites and it behaves the same.
Btw, this is the logcat :
02-22 09:35:51.434: I/ActivityManager(81): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.eatmicco.Training/.HelloActivity} from pid 212
02-22 09:35:51.444: D/PermissionCache(36): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (623 us)
02-22 09:35:51.704: D/dalvikvm(81): GC_FOR_ALLOC freed 149K, 7% free 11999K/12871K, paused 79ms
02-22 09:35:51.714: I/dalvikvm-heap(81): Grow heap (frag case) to 11.914MB for 129616-byte allocation
02-22 09:35:51.844: D/dalvikvm(81): GC_FOR_ALLOC freed 745K, 13% free 11380K/12999K, paused 68ms
02-22 09:35:51.913: D/dalvikvm(478): Not late-enabling CheckJNI (already on)
02-22 09:35:51.944: I/ActivityManager(81): Start proc com.eatmicco.Training for activity com.eatmicco.Training/.HelloActivity: pid=478 uid=10048 gids={1015}
02-22 09:35:51.954: D/(81): HostConnection::get() New Host Connection established 0xbdd28, tid 123
02-22 09:35:52.094: W/NetworkManagementSocketTagger(81): setKernelCountSet(10048, 1) failed with errno -2
02-22 09:35:52.124: D/OpenGLRenderer(212): Flushing caches (mode 1)
02-22 09:35:52.334: V/PhoneStatusBar(151): setLightsOn(true)
02-22 09:35:52.533: W/InputManagerService(81): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#415554e8 (uid=10013 pid=212)
02-22 09:35:52.533: D/(478): HostConnection::get() New Host Connection established 0x15c708, tid 478
02-22 09:35:52.593: D/OpenGLRenderer(212): Flushing caches (mode 0)
02-22 09:35:52.704: I/Process(81): Sending signal. PID: 478 SIG: 3
02-22 09:35:52.704: I/dalvikvm(478): threadid=3: reacting to signal 3
02-22 09:35:52.714: I/dalvikvm(478): Wrote stack traces to '/data/anr/traces.txt'
02-22 09:35:53.004: I/ActivityManager(81): Displayed com.eatmicco.Training/.HelloActivity: +1s114ms
02-22 09:35:53.154: W/NetworkManagementSocketTagger(81): setKernelCountSet(10013, 0) failed with errno -2
02-22 09:35:54.204: I/ActivityManager(81): START {act=android.intent.action.VIEW dat=http://www.google.com cmp=com.android.browser/.BrowserActivity} from pid 478
02-22 09:35:54.573: I/ActivityManager(81): Start proc com.android.browser for activity com.android.browser/.BrowserActivity: pid=491 uid=10002 gids={3003, 1015}
02-22 09:35:54.673: W/NetworkManagementSocketTagger(81): setKernelCountSet(10002, 1) failed with errno -2
02-22 09:35:54.933: I/ActivityThread(491): Pub com.android.browser;browser: com.android.browser.provider.BrowserProvider2
02-22 09:35:54.984: I/ActivityThread(491): Pub com.android.browser.home: com.android.browser.homepages.HomeProvider
02-22 09:35:54.984: I/ActivityThread(491): Pub com.android.browser.snapshots: com.android.browser.provider.SnapshotProvider
02-22 09:35:55.193: I/Process(81): Sending signal. PID: 491 SIG: 3
02-22 09:35:55.193: I/dalvikvm(491): threadid=3: reacting to signal 3
02-22 09:35:55.303: I/dalvikvm(491): Wrote stack traces to '/data/anr/traces.txt'
02-22 09:35:55.553: D/dalvikvm(491): GC_CONCURRENT freed 257K, 4% free 9281K/9607K, paused 8ms+4ms
02-22 09:35:55.603: E/ActivityThread(491): Failed to find provider info for com.google.settings
02-22 09:35:55.603: E/ActivityThread(491): Failed to find provider info for com.google.settings
02-22 09:35:55.693: I/Process(81): Sending signal. PID: 491 SIG: 3
02-22 09:35:55.693: I/dalvikvm(491): threadid=3: reacting to signal 3
02-22 09:35:55.813: I/dalvikvm(491): Wrote stack traces to '/data/anr/traces.txt'
02-22 09:35:55.893: D/dalvikvm(491): GC_FOR_ALLOC freed 191K, 4% free 9475K/9799K, paused 34ms
02-22 09:35:55.943: D/dalvikvm(491): GC_FOR_ALLOC freed 5K, 4% free 9647K/9991K, paused 31ms
02-22 09:35:55.993: D/dalvikvm(491): GC_FOR_ALLOC freed <1K, 4% free 9818K/10183K, paused 42ms
02-22 09:35:56.023: D/dalvikvm(491): GC_FOR_ALLOC freed <1K, 4% free 9989K/10375K, paused 35ms
02-22 09:35:56.073: D/dalvikvm(491): GC_FOR_ALLOC freed 1K, 4% free 10162K/10567K, paused 32ms
02-22 09:35:56.114: D/dalvikvm(491): GC_FOR_ALLOC freed <1K, 3% free 10504K/10759K, paused 33ms
02-22 09:35:56.163: E/libEGL(491): call to OpenGL ES API with no current context (logged once per thread)
02-22 09:35:56.183: D/ShaderProgram(491): couldn't load the vertex shader!
02-22 09:35:56.183: E/libEGL(491): call to OpenGL ES API with no current context (logged once per thread)
02-22 09:35:56.183: D/ShaderProgram(491): couldn't load the vertex shader!
02-22 09:35:56.183: E/libEGL(491): call to OpenGL ES API with no current context (logged once per thread)
02-22 09:35:56.183: D/ShaderProgram(491): couldn't load the vertex shader!
02-22 09:35:56.183: E/libEGL(491): call to OpenGL ES API with no current context (logged once per thread)
02-22 09:35:56.183: D/ShaderProgram(491): couldn't load the vertex shader!
02-22 09:35:56.183: E/libEGL(491): call to OpenGL ES API with no current context (logged once per thread)
02-22 09:35:56.183: D/ShaderProgram(491): couldn't load the vertex shader!
02-22 09:35:56.193: I/Process(81): Sending signal. PID: 491 SIG: 3
02-22 09:35:56.193: I/dalvikvm(491): threadid=3: reacting to signal 3
02-22 09:35:56.233: I/dalvikvm(491): Wrote stack traces to '/data/anr/traces.txt'
02-22 09:35:56.383: D/dalvikvm(491): GC_FOR_ALLOC freed 20K, 3% free 10896K/11143K, paused 57ms
02-22 09:35:56.393: D/WebViewTimersControl(491): onBrowserActivityResume
02-22 09:35:56.393: D/WebViewTimersControl(491): Resuming webview timers, view=com.android.browser.BrowserWebView#41313558
02-22 09:35:56.403: W/BaseUi(491): mMainView is already attached to wrapper in attachTabToContentView!
02-22 09:35:56.413: W/BaseUi(491): mContainer is already attached to content in attachTabToContentView!
02-22 09:35:56.433: V/NFC(491): this device does not have NFC support
02-22 09:35:56.543: D/libEGL(491): loaded /system/lib/egl/libGLES_android.so
02-22 09:35:56.593: D/libEGL(491): loaded /system/lib/egl/libEGL_emulation.so
02-22 09:35:56.593: D/(491): HostConnection::get() New Host Connection established 0x1ec618, tid 491
02-22 09:35:56.643: D/libEGL(491): loaded /system/lib/egl/libGLESv1_CM_emulation.so
02-22 09:35:56.643: D/libEGL(491): loaded /system/lib/egl/libGLESv2_emulation.so
02-22 09:35:56.703: I/Process(81): Sending signal. PID: 491 SIG: 3
02-22 09:35:56.703: I/dalvikvm(491): threadid=3: reacting to signal 3
02-22 09:35:56.793: W/EGL_emulation(491): eglSurfaceAttrib not implemented
02-22 09:35:56.823: D/OpenGLRenderer(491): Enabling debug mode 0
02-22 09:35:56.823: I/dalvikvm(491): Wrote stack traces to '/data/anr/traces.txt'
02-22 09:35:57.214: I/Process(81): Sending signal. PID: 491 SIG: 3
02-22 09:35:57.214: I/dalvikvm(491): threadid=3: reacting to signal 3
02-22 09:35:57.273: I/dalvikvm(491): Wrote stack traces to '/data/anr/traces.txt'
02-22 09:35:57.313: I/ActivityManager(81): Displayed com.android.browser/.BrowserActivity: +2s785ms
02-22 09:35:57.733: E/chromium(491): external/chromium/net/disk_cache/backend_impl.cc:1107: [0222/093557:ERROR:backend_impl.cc(1107)] Critical error found -8
02-22 09:35:57.893: D/dalvikvm(491): GC_CONCURRENT freed 65K, 3% free 11348K/11591K, paused 3ms+21ms
02-22 09:35:57.963: D/dalvikvm(491): GC_FOR_ALLOC freed 10K, 3% free 11337K/11591K, paused 60ms
02-22 09:35:57.963: I/dalvikvm-heap(491): Grow heap (frag case) to 11.765MB for 656656-byte allocation
02-22 09:35:57.993: W/chromium(491): external/chromium/net/disk_cache/storage_block-inl.h:119: [0222/093558:WARNING:storage_block-inl.h(119)] Failed data load.
02-22 09:35:57.993: W/chromium(491): external/chromium/net/disk_cache/storage_block-inl.h:119: [0222/093558:WARNING:storage_block-inl.h(119)] Failed data load.
02-22 09:35:58.003: W/chromium(491): external/chromium/net/disk_cache/storage_block-inl.h:119: [0222/093558:WARNING:storage_block-inl.h(119)] Failed data load.
02-22 09:35:58.033: W/chromium(491): external/chromium/net/disk_cache/storage_block-inl.h:119: [0222/093558:WARNING:storage_block-inl.h(119)] Failed data load.
02-22 09:35:58.053: E/chromium(491): external/chromium/net/disk_cache/entry_impl.cc:904: [0222/093558:ERROR:entry_impl.cc(904)] Failed to save user data
02-22 09:35:58.053: E/chromium(491): external/chromium/net/disk_cache/entry_impl.cc:904: [0222/093558:ERROR:entry_impl.cc(904)] Failed to save user data
02-22 09:35:58.143: D/dalvikvm(491): GC_FOR_ALLOC freed 0K, 3% free 11979K/12295K, paused 121ms
02-22 09:35:58.263: W/Tab(491): Failed to save back/forward list for http://www.google.com
02-22 09:35:58.883: W/NetworkManagementSocketTagger(81): setKernelCountSet(10048, 0) failed with errno -2
02-22 09:36:03.363: D/dalvikvm(165): GC_CONCURRENT freed 118K, 3% free 9760K/9991K, paused 4ms+5ms
02-22 09:36:04.403: D/(165): HostConnection::get() New Host Connection established 0x1e7f50, tid 165
02-22 09:36:04.773: D/dalvikvm(165): GC_FOR_ALLOC freed 143K, 3% free 9844K/10119K, paused 224ms
02-22 09:36:04.803: I/dalvikvm-heap(165): Grow heap (frag case) to 10.241MB for 591376-byte allocation
02-22 09:36:04.913: D/dalvikvm(165): GC_FOR_ALLOC freed 9K, 4% free 10412K/10759K, paused 99ms
02-22 09:36:05.053: D/dalvikvm(165): GC_CONCURRENT freed <1K, 4% free 10413K/10759K, paused 3ms+4ms
02-22 09:36:05.623: D/dalvikvm(151): GC_CONCURRENT freed 174K, 29% free 9975K/13959K, paused 4ms+16ms
02-22 09:36:05.803: D/dalvikvm(81): GC_CONCURRENT freed 278K, 12% free 11569K/12999K, paused 5ms+28ms
: E/(): Device disconnected
Can anyone tell me what's wrong here?
Thanks
I have an app where users can click on certain buttons in my app and it will launch specific settings page from Android to the user. I uses the android API from their website http://developer.android.com/reference/android/provider/Settings.html
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
currentContext.startActivity(intent);
Intent intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS);
currentContext.startActivity(intent);
These are some of the settings pages that my app will open. So far I have no problem launching these two intents from my app. However, when I try to launch the "About tablet" page with the code below, the Settings process crashes.
Intent intent = new Intent(Settings.ACTION_DEVICE_INFO_SETTINGS);
currentContext.startActivity(intent);
It crashes on android 4.1.1 but it works fine on android 3.2. I'm still new to Android and I am at a lost on why it crashes. I'm new to StackOverflow as well. Hopefully I am able to get some answers here and nice to meet you all.
Here's my logcat:
09-19 09:50:12.830: I/ActivityManager(270): START {act=android.settings.DEVICE_INFO_SETTINGS cmp=com.android.settings/.Settings$DeviceInfoSettingsActivity u=0} from pid 1627
09-19 09:50:12.910: D/dalvikvm(270): GC_FOR_ALLOC freed 738K, 13% free 11824K/13575K, paused 62ms, total 62ms
09-19 09:50:13.010: W/System.err(1675): Removed 2131231183
09-19 09:50:13.020: W/System.err(1675): Removed 2131231190
09-19 09:50:13.060: D/LocalBluetoothProfileManager(1675): LocalBluetoothProfileManager construction complete
09-19 09:50:13.060: D/AndroidRuntime(1675): Shutting down VM
09-19 09:50:13.060: W/dalvikvm(1675): threadid=1: thread exiting with uncaught exception (group=0x40d4c300)
09-19 09:50:13.060: E/AndroidRuntime(1675): FATAL EXCEPTION: main
09-19 09:50:13.060: E/AndroidRuntime(1675): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.Settings$DeviceInfoSettingsActivity}: java.lang.NullPointerException
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.access$600(ActivityThread.java:130)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.os.Looper.loop(Looper.java:137)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.main(ActivityThread.java:4745)
09-19 09:50:13.060: E/AndroidRuntime(1675): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 09:50:13.060: E/AndroidRuntime(1675): at java.lang.reflect.Method.invoke(Method.java:511)
09-19 09:50:13.060: E/AndroidRuntime(1675): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-19 09:50:13.060: E/AndroidRuntime(1675): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-19 09:50:13.060: E/AndroidRuntime(1675): at dalvik.system.NativeStart.main(Native Method)
09-19 09:50:13.060: E/AndroidRuntime(1675): Caused by: java.lang.NullPointerException
09-19 09:50:13.060: E/AndroidRuntime(1675): at com.android.settings.Settings.onCreate(Settings.java:167)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.Activity.performCreate(Activity.java:5008)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
09-19 09:50:13.060: E/AndroidRuntime(1675): ... 11 more
09-19 09:50:13.090: W/ActivityManager(270): Force finishing activity com.android.settings/.Settings$DeviceInfoSettingsActivity
09-19 09:50:13.090: W/ActivityManager(270): Force finishing activity com.panasonic.tbexperience/.view.templates.TwoColumnsControlActivity
09-19 09:50:13.100: W/InputMethodManagerService(270): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41811de8 attribute=null
09-19 09:50:13.130: D/dalvikvm(1675): GC_CONCURRENT freed 187K, 4% free 6233K/6471K, paused 12ms+5ms, total 60ms
09-19 09:50:13.610: W/ActivityManager(270): Activity pause timeout for ActivityRecord{417ea2e0 com.android.settings/.Settings$DeviceInfoSettingsActivity}
09-19 09:50:13.820: D/dalvikvm(445): GC_FOR_ALLOC freed 1020K, 33% free 14790K/22023K, paused 41ms, total 41ms
09-19 09:50:13.960: D/dalvikvm(445): GC_FOR_ALLOC freed 1057K, 30% free 15633K/22023K, paused 39ms, total 39ms
09-19 09:50:14.010: D/dalvikvm(445): GC_FOR_ALLOC freed 362K, 24% free 16871K/22023K, paused 32ms, total 32ms
09-19 09:50:14.060: D/dalvikvm(445): GC_CONCURRENT freed 1289K, 20% free 17622K/22023K, paused 3ms+7ms, total 39ms
09-19 09:50:14.060: D/dalvikvm(445): WAIT_FOR_CONCURRENT_GC blocked 29ms
09-19 09:50:14.060: D/dalvikvm(445): WAIT_FOR_CONCURRENT_GC blocked 17ms
09-19 09:50:14.100: D/dalvikvm(445): GC_FOR_ALLOC freed 1693K, 25% free 16723K/22023K, paused 31ms, total 31ms
09-19 09:50:14.190: D/dalvikvm(445): GC_CONCURRENT freed 1126K, 21% free 17585K/22023K, paused 14ms+9ms, total 64ms
09-19 09:50:14.190: D/dalvikvm(445): WAIT_FOR_CONCURRENT_GC blocked 50ms
09-19 09:50:14.390: I/dalvikvm(270): Jit: resizing JitTable from 8192 to 16384
09-19 09:50:16.870: I/Process(1675): Sending signal. PID: 1675 SIG: 9
09-19 09:50:16.890: I/ActivityManager(270): Process com.android.settings (pid 1675) has died.
09-19 09:50:16.890: W/ActivityManager(270): Force removing ActivityRecord{4166f668 com.android.settings/.Settings$DeviceInfoSettingsActivity}: app died, no saved state
09-19 09:50:16.890: W/InputMethodManagerService(270): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#415f2878 attribute=null
09-19 09:50:32.250: D/dalvikvm(1552): GC_CONCURRENT freed 424K, 9% free 6942K/7559K, paused 12ms+3ms, total 39ms
Also, I tried to directly set the classname for this api...
Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.Settings$DeviceInfoSettingsActivity");
currentContext.startActivity(intent);
Same thing happens.It works for android 3.2 but doesn't work in 4.1.1. I've got a feeling that maybe I did not get the right class name for the 4.1.1 version. Does anyone know the direct class name to open the "About Tablet" page or whether is it possible to open that page programmatically?
Regards,
shuwen
android api doc say:
In some cases, a matching Activity may not exist, so ensure you safeguard against this.
so you should check this intent or catch this exception yourself.