No Baseline profile found in target apk - android

I am trying to use baseline profile generated and run benchmark test. Despite copying baseline profile, I am still facing issues. I copied it in all variant folders just to make sure its not missed, still getting file not found exception.
java.lang.RuntimeException: No baseline profile was found in the target apk.
at androidx.benchmark.macro.CompilationMode$Partial.compileImpl$benchmark_macro_release(CompilationMode.kt:339)
at androidx.benchmark.macro.CompilationMode.resetAndCompile$benchmark_macro_release(CompilationMode.kt:76)
at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmark(Macrobenchmark.kt:139)
at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmarkWithStartupMode(Macrobenchmark.kt:301)
at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated(MacrobenchmarkRule.kt:106)
at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated$default(MacrobenchmarkRule.kt:96)
at com.example.mobile.android.beta.benchmark.exampleStartupBenchmark.startup(ExampleStartupBenchmark.kt:44)
at com.example.mobile.android.beta.benchmark.exampleStartupBenchmark.startUpCompilationModePartial(ExampleStartupBenchmark.kt:35)
02-03 16:51:28.498 9721 9721 D ProfileInstaller: Installing profile for com.example.mobile.android.beta.test
02-03 16:51:28.499 9721 9780 V FA : Connecting to remote service
02-03 16:51:28.501 9721 9721 E ProfileInstaller: RESULT_BASELINE_PROFILE_NOT_FOUND
02-03 16:51:28.501 9721 9721 E ProfileInstaller: java.io.FileNotFoundException: dexopt/baseline.prof
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.content.res.AssetManager.nativeOpenAsset(Native Method)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.content.res.AssetManager.open(AssetManager.java:904)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.content.res.AssetManager.open(AssetManager.java:881)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at androidx.profileinstaller.DeviceProfileWriter.read(DeviceProfileWriter.java:163)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at androidx.profileinstaller.ProfileInstaller.transcodeAndWrite(ProfileInstaller.java:434)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at androidx.profileinstaller.ProfileInstaller.writeProfile(ProfileInstaller.java:565)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at androidx.profileinstaller.ProfileInstallReceiver.onReceive(ProfileInstallReceiver.java:104)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.app.ActivityThread.handleReceiver(ActivityThread.java:4306)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2153)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.os.Handler.dispatchMessage(Handler.java:106)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.os.Looper.loopOnce(Looper.java:201)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.os.Looper.loop(Looper.java:288)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at android.app.ActivityThread.main(ActivityThread.java:7872)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at java.lang.reflect.Method.invoke(Native Method)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
02-03 16:51:28.501 9721 9721 E ProfileInstaller: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)example
Even after adding baseline profile to main, it still gives me error.

Related

How to disable feature:android.hardware.bluetooth in aosp_car_x86_64-userdebug (android 11 automotive emulator)

I want to disable the feature:android.hardware.bluetooth for android automotive emulator 11.
Version that I synced with repo: android-11.0.0_r3
Version that I lunch: aosp_car_x86_64-userdebug
Changed files to comment out the permissions:
car.mk
# frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
# frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
Commented the permission in:
car_core_hardware.xml
<!-- <feature name="android.hardware.bluetooth" /> -->
If I run the emulator and ask the packagemanager, it is still convinced Bluetooth feature is enabled:
pm list features
feature:android.hardware.bluetooth
feature:android.hardware.bluetooth_le
When I removed the files (android.hardware.bluetooth.xml) from the out folder it got disabled.
Problem is that Automotive cannot handle this disabling because it starts to crash:
01-07 15:12:08.833 8509 8509 D PerUserCarService: onCreate()
01-07 15:12:08.834 8509 8509 E BluetoothAdapter: Bluetooth binder is null
01-07 15:12:08.835 8509 8509 D AndroidRuntime: Shutting down VM
01-07 15:12:08.835 8509 8509 E AndroidRuntime: FATAL EXCEPTION: main
01-07 15:12:08.835 8509 8509 E AndroidRuntime: Process: com.android.car, PID: 8509
01-07 15:12:08.835 8509 8509 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.android.car.PerUserCarService: java.lang.NullPointerException: Bluetooth adapter cannot be null
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4204)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:237)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7656)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: Caused by: java.lang.NullPointerException: Bluetooth adapter cannot be null
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at java.util.Objects.requireNonNull(Objects.java:245)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at com.android.car.CarBluetoothUserService.<init>(CarBluetoothUserService.java:84)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at com.android.car.PerUserCarService.onCreate(PerUserCarService.java:66)
01-07 15:12:08.835 8509 8509 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4192)
android.hardware.bluetooth.xml may have slipped through some other .mk file in your device build config (it may be copied to /etc/permissions multiple times). Try removing it from running device:
adb root && adb remount && adb reboot
adb root && adb remount
export BT=etc/permissions/android.hardware.bluetooth.xml
adb shell rm /$BT /*/$BT /*/*/$BT
export BT=etc/permissions/android.hardware.bluetooth_le.xml
adb shell rm /$BT /*/$BT /*/*/$BT
adb reboot
adb shell pm list features | grep blue
For me, it removed android.hardware.bluetooth_le but not android.hardware.bluetooth feature. The latter disappeared after editing the <target type>_core_hardware.xml file you mentioned.
After you verify if removing the xml files helps, you need to review all mk files your device might be using to track where it was copied (with PRODUCT_COPY_FILES). After each try, review the contents of your $OUT directory (you may need to manually remove the xml file from output before the build, buildsystem doesn't always do it cleanly).

Unable to start activity ComponentInfo android.view.InflateException: Binary XML file line #27: Error inflating class fragment

When I run YouTube WatchMe android project, I get below exception:
02-03 14:06:36.865: E/AndroidRuntime(14244): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.watchme/com.google.android.apps.watchme.MainActivity}: android.view.InflateException: Binary XML file line #27: Error inflating class fragment
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.ActivityThread.access$700(ActivityThread.java:150)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.os.Handler.dispatchMessage(Handler.java:99)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.os.Looper.loop(Looper.java:137)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.ActivityThread.main(ActivityThread.java:5283)
02-03 14:06:36.865: E/AndroidRuntime(14244): at java.lang.reflect.Method.invokeNative(Native Method)
02-03 14:06:36.865: E/AndroidRuntime(14244): at java.lang.reflect.Method.invoke(Method.java:511)
02-03 14:06:36.865: E/AndroidRuntime(14244): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
02-03 14:06:36.865: E/AndroidRuntime(14244): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
02-03 14:06:36.865: E/AndroidRuntime(14244): at dalvik.system.NativeStart.main(Native Method)
02-03 14:06:36.865: E/AndroidRuntime(14244): Caused by: android.view.InflateException: Binary XML file line #27: Error inflating class fragment
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:710)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
02-03 14:06:36.865: E/AndroidRuntime(14244): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:364)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.Activity.setContentView(Activity.java:1930)
02-03 14:06:36.865: E/AndroidRuntime(14244): at com.google.android.apps.watchme.MainActivity.onCreate(MainActivity.java:82)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.Activity.performCreate(Activity.java:5283)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
02-03 14:06:36.865: E/AndroidRuntime(14244): ... 11 more
02-03 14:06:36.865: E/AndroidRuntime(14244): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.apps.watchme.EventsListFragment: make sure class name exists, is public, and has an empty constructor that is public
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.Fragment.instantiate(Fragment.java:596)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.Fragment.instantiate(Fragment.java:560)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.Activity.onCreateView(Activity.java:4864)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:686)
02-03 14:06:36.865: E/AndroidRuntime(14244): ... 21 more
02-03 14:06:36.865: E/AndroidRuntime(14244): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.watchme.EventsListFragment" on path: /data/app/com.google.android.apps.watchme-1.apk
02-03 14:06:36.865: E/AndroidRuntime(14244): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
02-03 14:06:36.865: E/AndroidRuntime(14244): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-03 14:06:36.865: E/AndroidRuntime(14244): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-03 14:06:36.865: E/AndroidRuntime(14244): at android.app.Fragment.instantiate(Fragment.java:582)
02-03 14:06:36.865: E/AndroidRuntime(14244): ... 24 more
Code:
public class MainActivity extends Activity implements
EventsListFragment.Callbacks {
private EventsListFragment mEventsListFragment;
#Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mEventsListFragment = (EventsListFragment) getFragmentManager()
.findFragmentById(R.id.list_fragment);
}
}
I checked everything my package name, xmls but I don't why I am getting this one.
Check if EventsListFragment is public
in one of your layout files(activity_main) you are passing
com.google.android.apps.watchme.EventsListFragment as an address for your fragment
, check if the address for EventsListFragment is correct
Adding android-support-v4.jar solved my problem. Also, changed priority to top & checked it in project properties section.

Android 4.4.2 fbioget_fscreeninfo failed using webview

I'm currently using ionic library to create the UI of my app. The pages/js/css files are stored locally in assets folder.
They will be loaded into WebView component at start of the app.
I've been testing/developing it on my Nexus 5. And everything was okay, until I tested on a Samsung GS3. Below is the log
02-03 19:00:15.379: I/Crashlytics(8952): Initializing Crashlytics 1.1.13.29
02-03 19:00:15.389: D/APPPPPPP(8952): onCreate
02-03 19:00:15.419: V/WebViewChromium(8952): Binding Chromium to the background looper Looper (main, tid 1) {420a43e0}
02-03 19:00:15.419: I/chromium(8952): [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
02-03 19:00:15.419: I/BrowserProcessMain(8952): Initializing chromium process, renderers=0
02-03 19:00:15.459: W/Adreno-GSL(8952): <get_panel_settings:3802>: Android framework reported version 2. So, don't force ES30
02-03 19:00:15.459: W/chromium(8952): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
02-03 19:00:15.459: I/Adreno-EGL(8952): <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_KK_2.7_RB1.04.04.00.007.018_msm8960_KK_2.7_RB1_CL3869936_release_AU (CL3869936)
02-03 19:00:15.459: I/Adreno-EGL(8952): OpenGL ES Shader Compiler Version: 17.01.10.SPL
02-03 19:00:15.459: I/Adreno-EGL(8952): Build Date: 12/09/13 Mon
02-03 19:00:15.459: I/Adreno-EGL(8952): Local Branch: mybranch2092625
02-03 19:00:15.459: I/Adreno-EGL(8952): Remote Branch: quic/kk_2.7_rb1.15
02-03 19:00:15.459: I/Adreno-EGL(8952): Local Patches: NONE
02-03 19:00:15.459: I/Adreno-EGL(8952): Reconstruct Branch: AU_LINUX_ANDROID_KK_2.7_RB1.04.04.00.007.018 + NOTHING
02-03 19:00:15.599: D/APPPPPP(8952): onStart
02-03 19:00:15.599: D/APPPPPP(8952): onResume
02-03 19:00:15.689: D/OpenGLRenderer(8952): Enabling debug mode 0
02-03 19:00:15.699: W/AwContents(8952): nativeOnDraw failed; clearing to background color.
02-03 19:00:15.749: W/AwContents(8952): nativeOnDraw failed; clearing to background color.
02-03 19:00:15.829: I/chromium(8952): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
02-03 19:00:15.909: I/chromium(8952): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
02-03 19:00:15.929: E/qdutils(8952): FBIOGET_FSCREENINFO failed
02-03 19:00:15.929: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.929: E/qdmemalloc(8952):
02-03 19:00:15.929: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.929: E/qdmemalloc(8952):
02-03 19:00:15.929: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.929: E/qdmemalloc(8952):
02-03 19:00:15.929: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.929: E/qdmemalloc(8952):
02-03 19:00:15.929: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.929: E/qdmemalloc(8952):
02-03 19:00:15.929: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.929: E/qdmemalloc(8952):
02-03 19:00:15.929: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.929: E/qdmemalloc(8952):
02-03 19:00:15.939: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.939: E/qdmemalloc(8952):
02-03 19:00:15.939: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.939: E/qdmemalloc(8952):
02-03 19:00:15.939: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.939: E/qdmemalloc(8952):
02-03 19:00:15.939: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.939: E/qdmemalloc(8952):
02-03 19:00:15.939: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.939: E/qdmemalloc(8952):
02-03 19:00:15.939: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.939: E/qdmemalloc(8952):
02-03 19:00:15.939: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.939: E/qdmemalloc(8952):
02-03 19:00:15.949: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.949: E/qdmemalloc(8952):
02-03 19:00:15.949: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.949: E/qdmemalloc(8952):
02-03 19:00:15.949: E/qdmemalloc(8952): heap_msk=3000000 flags=1
02-03 19:00:15.949: E/qdmemalloc(8952):
02-03 19:00:15.949: E/qdmemalloc(8952): heap_msk=40000000 flags=1
02-03 19:00:15.949: E/qdmemalloc(8952):
02-03 19:00:17.691: I/X509Util(8952): Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
02-03 19:00:18.312: W/UnimplementedWebViewApi(8952): Unimplemented WebView method onKeyDown called from: android.webkit.WebView.onKeyDown(WebView.java:2182)
02-03 19:00:18.412: D/APPPPPP(8952): onPause
02-03 19:00:18.622: W/IInputConnectionWrapper(8952): showStatusIcon on inactive InputConnection
02-03 19:00:18.812: I/chromium(8952): [INFO:CONSOLE(133)] "Error: [$injector:unpr] http://errors.angularjs.org/1.3.6/$injector/unpr?p0=%24cookiesProvider%20%3C-%20%24cookies%20%3C-%20LoginCtrl
02-03 19:00:18.812: I/chromium(8952): at Error (<anonymous>)
02-03 19:00:18.812: I/chromium(8952): at file:///android_asset/js/ionic.bundle.min.js:37:416
02-03 19:00:18.812: I/chromium(8952): at file:///android_asset/js/ionic.bundle.min.js:69:232
02-03 19:00:18.812: I/chromium(8952): at Object.d [as get] (file:///android_asset/js/ionic.bundle.min.js:67:238)
02-03 19:00:18.812: I/chromium(8952): at file:///android_asset/js/ionic.bundle.min.js:69:306
02-03 19:00:18.812: I/chromium(8952): at d (file:///android_asset/js/ionic.bundle.min.js:67:238)
02-03 19:00:18.812: I/chromium(8952): at e (file:///android_asset/js/ionic.bundle.min.js:67:497)
02-03 19:00:18.812: I/chromium(8952): at Object.instantiate (file:///android_asset/js/ionic.bundle.min.js:68:130)
02-03 19:00:18.812: I/chromium(8952): at file:///android_asset/js/ionic.bundle.min.js:107:195
02-03 19:00:18.812: I/chromium(8952): at w.appendViewElement (file:///android_asset/js/ionic.bundle.min.js:384:24465)", source: file:///android_asset/js/ionic.bundle.min.js (133)
02-03 19:00:19.133: D/APPPPPP(8952): onStop
02-03 19:00:19.133: D/APPPPPP(8952): onDestroy

"FATAL EXCEPTION: main" on success callback for camera in cordova

I am using cordova 3.6 and android 4.4 and i used a simple example for opening a camera or choose picture from gallery but on every success callback for camera getting below error
02-03 16:39:04.279: E/AndroidRuntime(3403): FATAL EXCEPTION: main
02-03 16:39:04.279: E/AndroidRuntime(3403): java.lang.RuntimeException: Unable to resume activity {com.CameraOptionApp/com.CameraOptionApp.CameraOptionApp}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=18, result=-1, data=Intent { dat=content://media/external/images/media/5027 }} to activity {com.CameraOptionApp/com.CameraOptionApp.CameraOptionApp}: java.lang.NullPointerException
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2732)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2760)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2216)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.access$600(ActivityThread.java:149)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.os.Handler.dispatchMessage(Handler.java:99)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.os.Looper.loop(Looper.java:153)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.main(ActivityThread.java:5086)
02-03 16:39:04.279: E/AndroidRuntime(3403): at java.lang.reflect.Method.invokeNative(Native Method)
02-03 16:39:04.279: E/AndroidRuntime(3403): at java.lang.reflect.Method.invoke(Method.java:511)
02-03 16:39:04.279: E/AndroidRuntime(3403): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
02-03 16:39:04.279: E/AndroidRuntime(3403): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
02-03 16:39:04.279: E/AndroidRuntime(3403): at dalvik.system.NativeStart.main(Native Method)
02-03 16:39:04.279: E/AndroidRuntime(3403): Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=18, result=-1, data=Intent { dat=content://media/external/images/media/5027 }} to activity {com.CameraOptionApp/com.CameraOptionApp.CameraOptionApp}: java.lang.NullPointerException
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.deliverResults(ActivityThread.java:3302)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2715)
02-03 16:39:04.279: E/AndroidRuntime(3403): ... 12 more
02-03 16:39:04.279: E/AndroidRuntime(3403): Caused by: java.lang.NullPointerException
02-03 16:39:04.279: E/AndroidRuntime(3403): at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:779)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.Activity.dispatchActivityResult(Activity.java:5204)
02-03 16:39:04.279: E/AndroidRuntime(3403): at android.app.ActivityThread.deliverResults(ActivityThread.java:3298)
02-03 16:39:04.279: E/AndroidRuntime(3403): ... 13 more
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): Logger$UncaughtExceptionHandler.uncaughtException in Logger.java:438 :: Uncaught Exception
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): java.lang.RuntimeException: Unable to resume activity {com.CameraOptionApp/com.CameraOptionApp.CameraOptionApp}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=18, result=-1, data=Intent { dat=content://media/external/images/media/5027 }} to activity {com.CameraOptionApp/com.CameraOptionApp.CameraOptionApp}: java.lang.NullPointerException
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2732)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2760)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2216)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.access$600(ActivityThread.java:149)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.os.Handler.dispatchMessage(Handler.java:99)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.os.Looper.loop(Looper.java:153)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.main(ActivityThread.java:5086)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at java.lang.reflect.Method.invokeNative(Native Method)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at java.lang.reflect.Method.invoke(Method.java:511)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at dalvik.system.NativeStart.main(Native Method)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=18, result=-1, data=Intent { dat=content://media/external/images/media/5027 }} to activity {com.CameraOptionApp/com.CameraOptionApp.CameraOptionApp}: java.lang.NullPointerException
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.deliverResults(ActivityThread.java:3302)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2715)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): ... 12 more
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): Caused by: java.lang.NullPointerException
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:779)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.Activity.dispatchActivityResult(Activity.java:5204)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): at android.app.ActivityThread.deliverResults(ActivityThread.java:3298)
02-03 16:39:04.287: E/com.worklight.common.Logger$UncaughtExceptionHandler(3403): ... 13 more
02-03 16:39:04.291: D/wl(3403): WL.doPrepareAssetsWork in WL.java:287 :: no need to check web resource integrity
I tried on different machine also but having same issue.

How do I find and fix an uncaught exception?

I don't know how to figure out where an uncaught exception is coming from. I have looked through the stackoverflow posts and tried looking for several of the solutions. As far as I can tell, I have my activity, "Monitor", listed in my manifest and it is part of the package. But I get a null pointer exception when I start the "Monitor" activity. What should I be looking for to find this exception?
02-03 21:44:14.192: E/Trace(19701): error opening trace file: No such file or directory (2)
02-03 21:44:14.262: I/BugSenseHandler(19701): Registering default exceptions handler
02-03 21:44:14.633: I/Setup(19701): Setup activity created
02-03 21:44:14.813: I/BugSenseHandler(19701): Flushing...
02-03 21:44:14.823: I/BugSenseHandler(19701): Registering default exceptions handler
02-03 21:44:15.023: W/BugSenseHandler(19701): Transmitting ping Exception No peer certificate
02-03 21:44:15.403: I/Adreno200-EGLSUB(19701): <ConfigWindowMatch:2087>: Format RGBA_8888.
02-03 21:44:15.594: E/(19701): <s3dReadConfigFile:75>: Can't open file for reading
02-03 21:44:15.594: E/(19701): <s3dReadConfigFile:75>: Can't open file for reading
02-03 21:44:19.318: W/dalvikvm(19701): threadid=1: thread exiting with uncaught exception (group=0x41bfb438)
02-03 21:44:22.401: E/AndroidRuntime(19701): FATAL EXCEPTION: main
02-03 21:44:22.401: E/AndroidRuntime(19701): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mpeterson.sousvide/com.mpeterson.sousvide.Monitor}: java.lang.NullPointerException
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2024)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2132)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.ActivityThread.access$600(ActivityThread.java:139)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1231)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.os.Handler.dispatchMessage(Handler.java:99)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.os.Looper.loop(Looper.java:137)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.ActivityThread.main(ActivityThread.java:5021)
02-03 21:44:22.401: E/AndroidRuntime(19701): at java.lang.reflect.Method.invokeNative(Native Method)
02-03 21:44:22.401: E/AndroidRuntime(19701): at java.lang.reflect.Method.invoke(Method.java:511)
02-03 21:44:22.401: E/AndroidRuntime(19701): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
02-03 21:44:22.401: E/AndroidRuntime(19701): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
02-03 21:44:22.401: E/AndroidRuntime(19701): at dalvik.system.NativeStart.main(Native Method)
02-03 21:44:22.401: E/AndroidRuntime(19701): Caused by: java.lang.NullPointerException
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.Activity.findViewById(Activity.java:1851)
02-03 21:44:22.401: E/AndroidRuntime(19701): at com.mpeterson.sousvide.Monitor.<init>(Monitor.java:51)
02-03 21:44:22.401: E/AndroidRuntime(19701): at java.lang.Class.newInstanceImpl(Native Method)
02-03 21:44:22.401: E/AndroidRuntime(19701): at java.lang.Class.newInstance(Class.java:1319)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
02-03 21:44:22.401: E/AndroidRuntime(19701): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2015)
02-03 21:44:22.401: E/AndroidRuntime(19701): ... 11 more
Provided that you have editTextCurTemp defined as TextView in your_layout_file.xml, you must call
setContentView(R.layout.your_layout_file)
BEFORE you do any findViewById(), otherwise you will get NPE.

Categories

Resources