Please pardon me if this is the wrong section and feel free to report this thread with a request to move to the proper section.
I've been working on an app for XDA Developer TV. The source is located here: https://code.google.com/p/xda-adk/s...cts/xdaadk/app/src/com/google/android/DemoKit
I've been developing on a Nexus 7. I decided to switch to my Galaxy Nexus and the application Force Closes on This Line. Apparently my Bundle savedInstanceState == null.
This is the error:
Code:
09-09 21:59:58.959: D/AndroidRuntime(18735): Shutting down VM
09-09 21:59:58.959: W/dalvikvm(18735): threadid=1: thread exiting with uncaught exception (group=0x40a73300)
09-09 21:59:58.959: E/AndroidRuntime(18735): FATAL EXCEPTION: main
09-09 21:59:58.959: E/AndroidRuntime(18735): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.DemoKit/com.google.android.DemoKit.DemoKitPhone}: java.lang.NullPointerException
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.ActivityThread.access$600(ActivityThread.java:130)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.os.Handler.dispatchMessage(Handler.java:99)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.os.Looper.loop(Looper.java:137)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.ActivityThread.main(ActivityThread.java:4745)
09-09 21:59:58.959: E/AndroidRuntime(18735): at java.lang.reflect.Method.invokeNative(Native Method)
09-09 21:59:58.959: E/AndroidRuntime(18735): at java.lang.reflect.Method.invoke(Method.java:511)
09-09 21:59:58.959: E/AndroidRuntime(18735): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-09 21:59:58.959: E/AndroidRuntime(18735): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-09 21:59:58.959: E/AndroidRuntime(18735): at dalvik.system.NativeStart.main(Native Method)
09-09 21:59:58.959: E/AndroidRuntime(18735): Caused by: java.lang.NullPointerException
09-09 21:59:58.959: E/AndroidRuntime(18735): at com.google.android.DemoKit.DemoKitPhone.showTabContents(DemoKitPhone.java:47)
09-09 21:59:58.959: E/AndroidRuntime(18735): at com.google.android.DemoKit.DemoKitPhone.showControls(DemoKitPhone.java:42)
09-09 21:59:58.959: E/AndroidRuntime(18735): at com.google.android.DemoKit.BaseActivity.onCreate(BaseActivity.java:26)
09-09 21:59:58.959: E/AndroidRuntime(18735): at com.google.android.DemoKit.DemoKitPhone.onCreate(DemoKitPhone.java:32)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.Activity.performCreate(Activity.java:5008)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
09-09 21:59:58.959: E/AndroidRuntime(18735): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
09-09 21:59:58.959: E/AndroidRuntime(18735): ... 11 more
I don't really know how to troubleshoot it because it's a pretty low level problem. How can I fix this?
Disregard Everything i said before just had a look at the code. and reread your log, it is null pointing at like 47 of the DemoKitPhone
Code:
45 - void showTabContents(Boolean showInput) {
46 - if (showInput) {
47 - mInputContainer.setVisibility(View.VISIBLE);
48 - mOutputContainer.setVisibility(View.GONE);
49 - mOutputLabel.setBackgroundDrawable(mNormalTabImage);
i recon the mInputContainer, mOutputContainer are null.
Let me know how ya go.
Pvy
AdamOutler said:
Please pardon me if this is the wrong section and feel free to report this thread with a request to move to the proper section.
I've been working on an app for XDA Developer TV. The source is located here: https://code.google.com/p/xda-adk/s...cts/xdaadk/app/src/com/google/android/DemoKit
Click to expand...
Click to collapse
may be a little crazy but i remember reading that the
Code:
super.onCreate(savedInstanceState);
Must be first in your overridden onCreate()
i'll DL the code tonight and take another look later if no-one else comes back before hand
Pvy.
@pvyParts, It already has super.Oncreate and the log warns about a null de-reference on another line, i don't think that's the problem.
This might be helpful.
Super class method does not seem to initialize mInputContainer and it's done by view finder in their demokit2 package. Since your code does not explicitly set it to an object, it causes a null dereference when you call a method from a null pointing class. You can confirm this by trying:
Code:
void showTabContents(Boolean showInput) {
if (showInput) {
mOutputContainer.setVisibility(View.GONE);
mInputContainer.setVisibility(View.VISIBLE);
mOutputLabel.setBackgroundDrawable(mNormalTabImage);
} else {
mInputContainer.setVisibility(View.GONE);
mInputLabel.setBackgroundDrawable(mNormalTabImage);
mOutputContainer.setVisibility(View.VISIBLE);
mOutputLabel.setBackgroundDrawable(mFocusedTabImage);
}
}
If this causes null reference exception at mOutputContainer.setVisibility then you need to set mOutputContainer and mInputContainer to a valid LinearLayout object/resource before calling their class methods.
Rick_1995 said:
@pvyParts, It already has super.Oncreate and the log warns about a null de-reference on another line, i don't think that's the problem.
[/CODE]
If this causes null reference exception at mOutputContainer.setVisibility then you need to set mOutputContainer and mInputContainer to a valid LinearLayout object/resource before calling their class methods.
Click to expand...
Click to collapse
Yeah once i re-read the code at home i saw what was wrong made me feel rather noobish for getting it so dam wrong
Pvy
Related
I'm trying to make the sample camera application on Nexus One.
Until now, the programming is not commercial and only test program.
I referenced the source code of android 1.5 platform.
The test code that I made is working well on the other android 1.5 phone.
But the code is not working on Nexus One.
I checked the log of Nexus One.
If I press shutter button, surfaceChanged(...) is called on the android 1.5 phone.
However, surfaceDestroyed(...) is called on Nexus One.
I don't why suraceDestroyed(...) is called.
If anybody has information about this problem, please let me know that.
Thanks in advance.
Hi,
I believe that there's a great change between 1.5 and 2.1 APIs. Rarely apps made for 1.5 are compatible with 2.1. Though, I'm definitely not at expert at this. Why not code a check to use which method depending on the version of the phone?
Ok.....Maybe, there is a great difference between 1.5 and 2.0.
However, I think that there is only little difference for camera application.
Maybe, you agree that the example code of android sdk 2.0 would work well on Nexus One.
But the CameraPreview.java doesn't work on Nuxus.
CameraPreview.java Example(Anroid SDK 2.0) not working......
I'm trying to program my camera application on Nexus One,
But the example code of android sdk 2.0 isn't working.
The example source is the CamraPreview.java.
Maybe, the preview size is the problem but I don't know how to fix the problem.
I include the log of CameraView.java on Nexus One.
If anybody has the information about this problem, please let me know that.
Thanks in advance.
========> The log of CameraPreview.java on Nexus One
E/QualcommCameraHardware( 52): Invalid preview size requested: 533x295
I/QualcommCameraHardware( 52): Set zoom=0
D/AndroidRuntime( 2551): Shutting down VM
W/dalvikvm( 2551): threadid=3: thread exiting with uncaught exception (group=0x4001b180)
E/AndroidRuntime( 2551): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2551): java.lang.RuntimeException: setParameters failed
E/AndroidRuntime( 2551): at android.hardware.Camera.native_setParameters(Native Method)
E/AndroidRuntime( 2551): at android.hardware.Camera.setParameters(Camera.java:619)
E/AndroidRuntime( 2551): at com.example.android.apis.graphics.Preview.surfaceChanged(CameraPreview.java:90)
E/AndroidRuntime( 2551): at android.view.SurfaceView.updateWindow(SurfaceView.java:460)
E/AndroidRuntime( 2551): at android.view.SurfaceView.dispatchDraw(SurfaceView.java:287)
E/AndroidRuntime( 2551): at android.view.ViewGroup.drawChild(ViewGroup.java:1529)
E/AndroidRuntime( 2551): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
E/AndroidRuntime( 2551): at android.view.View.draw(View.java:6538)
E/AndroidRuntime( 2551): at android.widget.FrameLayout.draw(FrameLayout.java:352)
E/AndroidRuntime( 2551): at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
E/AndroidRuntime( 2551): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
E/AndroidRuntime( 2551): at android.view.View.draw(View.java:6538)
E/AndroidRuntime( 2551): at android.widget.FrameLayout.draw(FrameLayout.java:352)
E/AndroidRuntime( 2551): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1830)
E/AndroidRuntime( 2551): at android.view.ViewRoot.draw(ViewRoot.java:1349)
E/AndroidRuntime( 2551): at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)
E/AndroidRuntime( 2551): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
E/AndroidRuntime( 2551): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2551): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2551): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 2551): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2551): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 2551): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 2551): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 2551): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 74): Sending signal. PID: 2551 SIG: 3
I/dalvikvm( 2551): threadid=7: reacting to signal 3
I/dalvikvm( 2551): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 2551): Sending signal. PID: 2551 SIG: 9
E/JavaBinder( 74): !!! FAILED BINDER TRANSACTION !!!
Can you please post all your logs here and don't create new thread for each problem you have.
Thanks.
blue0sky said:
E/QualcommCameraHardware( 52): Invalid preview size requested: 533x295
...
E/AndroidRuntime( 2551): at com.example.android.apis.graphics.Preview.surfaceChanged(CameraPreview.java:90)
Click to expand...
Click to collapse
You're right, it's the preview size. http://developer.android.com/reference/android/hardware/Camera.Parameters.html states:
Different devices may have different camera capabilities, such as picture size or flash modes. The application should query the camera capabilities before setting parameters.
Click to expand...
Click to collapse
You want to use
Code:
public List<Camera.Size> getSupportedPreviewSizes ()
to get a list of supported sizes and use one of those, instead of hardcoding the values.
I am using sonofskywalker3 Rom 4.4 and ec10_voodoo kernel and kept having force close problem with TTS service (Process.android.tts) when trying to use Navigation. Does anyone have similar problems?
This is the dump from the logcat:
I/ActivityManager( 2681): Start proc android.tts for service android.tts/.TtsService: pid=18962 uid=10049 gids={3003, 1015}
V/TtsService(18962): TtsService.onCreate()
W/dalvikvm(18962): ERROR: Unable to find decl for native Landroid/tts/SynthProxy;.native_setConfig (ILjava/lang/StringI
W/dalvikvm(18962): ERROR: Unable to find decl for native Landroid/tts/SynthProxy;.native_setup (Ljava/lang/Object;Ljava/lang/Strin
g;Ljava/lang/StringI
W/dalvikvm(18962): ERROR: Unable to find decl for native Landroid/tts/SynthProxy;.native_setLowShelf (ZFFFF)I
E/JNIHelp (18962): RegisterNatives failed for 'android/tts/SynthProxy'
W/dalvikvm(18962): JNI_OnLoad returned bad version (-1) in /system/lib/libttssynthproxy.so 0x483c3420
W/dalvikvm(18962): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Landroid/tts/SynthProxy;.<clinit>
D/AndroidRuntime(18962): Shutting down VM
W/dalvikvm(18962): threadid=1: thread exiting with uncaught exception (group=0x4001d7f0)
E/AndroidRuntime(18962): FATAL EXCEPTION: main
E/AndroidRuntime(18962): java.lang.ExceptionInInitializerError
E/AndroidRuntime(18962): at android.tts.TtsService.onCreate(TtsService.java:158)
E/AndroidRuntime(18962): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2959)
E/AndroidRuntime(18962): at android.app.ActivityThread.access$3300(ActivityThread.java:125)
E/AndroidRuntime(18962): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087)
E/AndroidRuntime(18962): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(18962): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(18962): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(18962): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(18962): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(18962): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime(18962): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime(18962): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(18962): Caused by: java.lang.UnsatisfiedLinkError: Library ttssynthproxy not found
E/AndroidRuntime(18962): at java.lang.Runtime.loadLibrary(Runtime.java:461)
E/AndroidRuntime(18962): at java.lang.System.loadLibrary(System.java:557)
E/AndroidRuntime(18962): at android.tts.SynthProxy.<clinit>(SynthProxy.java:154)
E/AndroidRuntime(18962): ... 12 more
I/ ( 2681): dumpmesg > "/data/log/dumpstate_app_error.log"
I/dumpstate(18971): begin
Yes i got the same problem, cant get voice navigation, TTS force close.
It might be the leaked version of Honeycomb but I can get the older non-tablet version of Mobilenoter to work but not the new version for HC tablets. I continue to get FCs on start. I've installed, uninstalled, re-installed, rebooted, and deleted directories to no avail. The original version works fine, but the Newer version for HC Tablets has some nice features that I would like to load up. The tool, while not a replacement for OneNote, does allow me to view and edit my OneNote files (no pen input) using skydrive. Anyone with similar issues or suggestions?
Checking logcat would probably be your best bet to see if any error messages were written out during the FC. Are you familiar with logcat? If not, see:
http://developer.android.com/guide/developing/tools/adb.html#logcat
for details.
The logcat file tends to be pretty big, so I tend to write it to an output file and possibly cut off the write procedure early.
Thanks for the directions on logcat. The best I can tell is that there is some resource / file missing. Beyond that, I have not done enough programming with android systems to figure it out.
Code:
I/ActivityManager( 1591): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.themsteam.mobilenoter.direct.tablet cmp=com.themsteam.mobilenoter.direct.tablet/com.themsteam.mobilenoter.ui.tablet.screens.home.TabletScreenHomeActivity } from pid 1694
I/PackageManager( 1591): Linking native library dir for /mnt/asec/com.popcap.pvz-1/pkg.apk
E/AndroidRuntime( 2780): FATAL EXCEPTION: main
E/AndroidRuntime( 2780): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.themsteam.mobilenoter.direct.tablet/com.themsteam.mobilenoter.ui.tablet.screens.home.TabletScreenHomeActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f020003
E/AndroidRuntime( 2780): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1997)
E/AndroidRuntime( 2780): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2018)
E/AndroidRuntime( 2780): at android.app.ActivityThread.access$500(ActivityThread.java:139)
E/AndroidRuntime( 2780): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1124)
E/AndroidRuntime( 2780): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2780): at android.os.Looper.loop(Looper.java:152)
E/AndroidRuntime( 2780): at android.app.ActivityThread.main(ActivityThread.java:4636)
E/AndroidRuntime( 2780): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2780): at java.lang.reflect.Method.invoke(Method.java:491)
E/AndroidRuntime( 2780): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime( 2780): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime( 2780): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2780): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020003
E/AndroidRuntime( 2780): at android.content.res.Resources.getValue(Resources.java:1100)
E/AndroidRuntime( 2780): at android.content.res.Resources.getDrawable(Resources.java:670)
E/AndroidRuntime( 2780): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2613)
E/AndroidRuntime( 2780): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2653)
E/AndroidRuntime( 2780): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:233)
E/AndroidRuntime( 2780): at android.app.Activity.setContentView(Activity.java:1871)
E/AndroidRuntime( 2780): at com.themsteam.mobilenoter.ui.tablet.screens.home.TabletScreenHomeActivity.onCreate(Unknown Source)
E/AndroidRuntime( 2780): at android.app.Activity.performCreate(Activity.java:4521)
E/AndroidRuntime( 2780): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
E/AndroidRuntime( 2780): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1961)
E/AndroidRuntime( 2780): ... 11 more
W/ActivityManager( 1591): Force finishing activity com.themsteam.mobilenoter.direct.tablet/com.themsteam.mobilenoter.ui.tablet.screens.home.TabletScreenHomeActivity
................
/ActivityManager( 1591): Activity pause timeout for ActivityRecord{40f1aa68 com.themsteam.mobilenoter.direct.tablet/com.themsteam.mobilenoter.ui.tablet.screens.home.TabletScreenHomeActivity}
D/ActivityManager( 1591): destroyActivityLocked, r=ActivityRecord{40f1aa68 com.themsteam.mobilenoter.direct.tablet/com.themsteam.mobilenoter.ui.tablet.screens.home.TabletScreenHomeActivity}
V/ActivityManager( 1591): destroyActivityLocked, dalvik.system.VMStack.getThreadStackTrace(Native Method)
V/ActivityManager( 1591): destroyActivityLocked, java.lang.Thread.getStackTrace(Thread.java:746)
V/ActivityManager( 1591): destroyActivityLocked, com.android.server.am.ActivityStack.destroyActivityLocked(ActivityStack.java:3535)
V/ActivityManager( 1591): destroyActivityLocked, com.android.server.am.ActivityStack.activityIdleInternal(ActivityStack.java:3217)
V/ActivityManager( 1591): destroyActivityLocked, com.android.server.am.ActivityManagerService.activityIdle(ActivityManagerService.java:4185)
V/ActivityManager( 1591): destroyActivityLocked, android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:353)
V/ActivityManager( 1591): destroyActivityLocked, com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1672)
V/ActivityManager( 1591): destroyActivityLocked, android.os.Binder.execTransact(Binder.java:339)
V/ActivityManager( 1591): destroyActivityLocked, dalvik.system.NativeStart.run(Native Method)
I/PackageManager( 1591): Linking native library dir for /mnt/asec/com.aol.mobile.engadget-1/pkg.apk
..................
V/HtcAppUsageStats( 1591): noteAppDied pid=2780
I/ActivityManager( 1591): Process com.themsteam.mobilenoter.direct.tablet (pid 2780) has died.
..................
W/ActivityManager( 1591): Activity destroy timeout for ActivityRecord{40f1aa68 com.themsteam.mobilenoter.direct.tablet/com.themsteam.mobilenoter.ui.tablet.screens.home.TabletScreenHomeActivity}
Nothing is jumping out at me from the logcat output, but I agree with you that it seems to be a missing resource file. There's not much information in the error log, so I believe the exception is just untreated by the developer. I guess the next step would be to send the logcat output to the developer.
Sorry I couldn't be of much more help....
bluebear13 said:
Nothing is jumping out at me from the logcat output, but I agree with you that it seems to be a missing resource file. There's not much information in the error log, so I believe the exception is just untreated by the developer. I guess the next step would be to send the logcat output to the developer.
Sorry I couldn't be of much more help....
Click to expand...
Click to collapse
Thanks anyway. I did send it in to the developer. It could be related to the Flyer HC leak since the program works fine on son's Lenovo Thinkpad Tablet.
I'm in the process of learning to build android from source. I've got my AOKP rom booting and am working on adding superuser to it, and am running into troubles. After much googling here is what I've done
Cloned Superuser source code
Code:
git clone git://github.com/ChainsDD/Superuser.git packages/apps/Superuser
Copied the su binary from my current rom (/system/xbin/su) to my device tree
Edited device.mk
Code:
# Build superuser
PRODUCT_PACKAGES := \
Superuser
# copy su binary
PRODUCT_COPY_FILES += \
device/lge/E973/su:system/xbin/su
Everything built fine and Superuser is in my app drawer when rom boots. If i try to open Superuser it force closes. Root checker shows that i am rooted, and typing 'su' in terminal emulator gets root access. Neither will give me a dialog asking to deny or grant.
If i install SuperSuperuser from the market, it will present all the normal dialogs and everything seems as it should.
I'm wondering what it is I'm doing wrong, and how I can correct it.
Here is a logcat of the failed attempt to open superuser
Code:
D/dalvikvm( 2157): Late-enabling CheckJNI
I/ActivityManager( 530): Start proc com.noshufou.android.su for activity com.noshufou.android.su/.Su: pid=2157 uid=10040 gids={50040, 3003, 1015, 1028}
I/dalvikvm( 2157): Turning on JNI app bug workarounds for target SDK version 11...
D/overlay ( 161): FROM_STATE = OV_BYPASS_3_LAYER TO_STATE = OV_CLOSED
I/ActivityThread( 2157): Pub com.noshufou.android.su.provider: com.noshufou.android.su.provider.PermissionsProvider
D/Su.HomeActivity( 2157): onCreate()
D/AndroidRuntime( 2157): Shutting down VM
W/dalvikvm( 2157): threadid=1: thread exiting with uncaught exception (group=0x40dd7930)
E/AndroidRuntime( 2157): FATAL EXCEPTION: main
E/AndroidRuntime( 2157): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.noshufou.android.su/com.noshufou.android.su.HomeActivity}: java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
E/AndroidRuntime( 2157): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306)
E/AndroidRuntime( 2157): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2356)
E/AndroidRuntime( 2157): at android.app.ActivityThread.access$600(ActivityThread.java:150)
E/AndroidRuntime( 2157): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
E/AndroidRuntime( 2157): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2157): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2157): at android.app.ActivityThread.main(ActivityThread.java:5193)
E/AndroidRuntime( 2157): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2157): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2157): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 2157): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
E/AndroidRuntime( 2157): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2157): Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
E/AndroidRuntime( 2157): at com.actionbarsherlock.ActionBarSherlock.wrap(ActionBarSherlock.java:232)
E/AndroidRuntime( 2157): at com.actionbarsherlock.app.SherlockFragmentActivity.getSherlock(SherlockFragmentActivity.java:32)
E/AndroidRuntime( 2157): at com.actionbarsherlock.app.SherlockFragmentActivity.requestWindowFeature(SherlockFragmentActivity.java:265)
E/AndroidRuntime( 2157): at com.noshufou.android.su.HomeActivity.onCreate(HomeActivity.java:59)
E/AndroidRuntime( 2157): at android.app.Activity.performCreate(Activity.java:5104)
E/AndroidRuntime( 2157): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime( 2157): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2260)
E/AndroidRuntime( 2157): ... 11 more
E/AndroidRuntime( 2157): Caused by: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
E/AndroidRuntime( 2157): at java.lang.Class.getConstructorOrMethod(Class.java:460)
E/AndroidRuntime( 2157): at java.lang.Class.getConstructor(Class.java:431)
E/AndroidRuntime( 2157): at com.actionbarsherlock.ActionBarSherlock.wrap(ActionBarSherlock.java:229)
E/AndroidRuntime( 2157): ... 17 more
W/ActivityManager( 530): Force finishing activity com.noshufou.android.su/.Su
D/dalvikvm( 2157): GC_CONCURRENT freed 219K, 15% free 2489K/2912K, paused 2ms+1ms, total 21ms
I/dalvikvm( 530): Jit: resizing JitTable from 8192 to 16384
W/ActivityManager( 530): Activity pause timeout for ActivityRecord{41681370 u0 com.noshufou.android.su/.Su}
I/Process ( 2157): Sending signal. PID: 2157 SIG: 9
I/ActivityManager( 530): Process com.noshufou.android.su (pid 2157) has died.
W/InputMethodManagerService( 530): Window already focused, ignoring focus gain of: [email protected] attribute=null, token = [email protected]
D/dalvikvm( 530): GC_CONCURRENT freed 7964K, 44% free 13574K/23868K, paused 2ms+6ms, total 57ms
D/overlay ( 161): FROM_STATE = OV_CLOSED TO_STATE = OV_BYPASS_3_LAYER
just a lilttle bump, if anyone can just point me in the dirrection of where i'm going wrong here I would be very appreciative.
Hey there,
I tried the PdfRenderer Sample Project on serveral AVDs (API lvl 23 and 24) and on my Galaxy A5 2015 with CM13 (API 23). the app starts and shows an empty activity - after about 10 seconds it crashes.
The Error:
Code:
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.pdfrendererbasic, PID: 27604
Theme: themes:{default=overlay:system, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system}
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.pdfrendererbasic/com.example.android.pdfrendererbasic.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.pdf.PdfRenderer.getPageCount()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.pdf.PdfRenderer.getPageCount()' on a null object reference
at com.example.android.pdfrendererbasic.PdfRendererBasicFragment.showPage(PdfRendererBasicFragment.java:163)
at com.example.android.pdfrendererbasic.PdfRendererBasicFragment.onViewCreated(PdfRendererBasicFragment.java:101)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:988)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)
at android.app.BackStackRecord.run(BackStackRecord.java:793)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)
at android.app.FragmentController.execPendingActions(FragmentController.java:325)
at android.app.Activity.performStart(Activity.java:6267)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)*
at android.app.ActivityThread.-wrap11(ActivityThread.java)*
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)*
at android.os.Handler.dispatchMessage(Handler.java:102)*
at android.os.Looper.loop(Looper.java:148)*
at android.app.ActivityThread.main(ActivityThread.java:5461)*
at java.lang.reflect.Method.invoke(Native Method)*
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)*
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)*
Application terminated.
What did I do wrong?
LG Christopher