skip to Main Content

I am trying to debug the CompassActivity class, but the app crashes between the startActivity call after I step, and the first line of OnCreate of CompassActivity. So it never steps in top OnCreate if I set a breakpoint

I am getting some strange errors in LogCat below, I dont know what they mean or where exactly the crash is.

My 2 classes are below. Below is OnCreate from MainActivity

public void onCreate(Bundle savedInstanceState) {

    Intent myIntent = new Intent(MainActivity.this, CompassActivity.class);
    MainActivity.this.startActivity(myIntent);

}

And the CompassActivity class is from here

How can i replace type_orientation (is deprecated) for android 4.0.3?

Am I starting the activity incorrectly?

The errors are:

Could not remove dir '/data/data/com.example.toolmap/code_cache/.ll/': No such file or directory
2023-03-17 15:16:50.510   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4225, appName:com.example.toolmap
2023-03-17 15:16:50.511   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4225, appName:com.example.toolmap
2023-03-17 15:16:50.511   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:5633, appName:com.example.toolmap
2023-03-17 15:16:50.512   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4225, appName:com.example.toolmap
2023-03-17 15:16:50.529   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4099, appName:com.example.toolmap/com.example.toolmap.MainActivity/1
2023-03-17 15:16:50.532   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:5633, appName:com.example.toolmap
2023-03-17 15:16:50.532   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:5633, appName:com.example.toolmap
2023-03-17 15:16:50.537   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4099, appName:com.example.toolmap/com.example.toolmap.MainActivity/1
2023-03-17 15:16:50.541   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4227, appName:com.example.toolmap
2023-03-17 15:16:50.541   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:5633, appName:com.example.toolmap
2023-03-17 15:16:50.541   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:5633, appName:com.example.toolmap
2023-03-17 15:16:50.571   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4225, appName:com.example.toolmap
2023-03-17 15:16:50.582   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:5633, appName:com.example.toolmap
2023-03-17 15:16:50.657   853-868   ANDR-PWR-OPT            poweropt-service                     E  PowerCore: PwrMain() 163: hintID:4225, appName:com.example.toolmap
2023-03-17 15:16:50.674  1985-2186  OplusThermalStats       system_server                        E  Error getting package info: com.example.toolmap
2023-03-17 15:16:50.733 12855-12855 oplus.andr...actoryImpl com.example.toolmap                  I  getOplusAutoResolutionFeature
---------------------------- PROCESS STARTED (12855) for package com.example.toolmap ----------------------------
2023-03-17 15:16:50.733 12855-12855 CompactWindowAppManager com.example.toolmap                  D  initCompactApplicationInfo 
2023-03-17 15:16:50.741 12855-12855 ActivityThread          com.example.toolmap                  W  Application com.example.toolmap is waiting for the debugger on port 8100...
2023-03-17 15:16:50.741 12855-12855 System.out              com.example.toolmap                  I  Sending WAIT chunk
2023-03-17 15:16:51.194  3453-3778  AuthDialogHelper        com.oplus.persist.system             E  CheckNotificationCanBeSetSecond: check com.example.toolmap , Notification master switch on, unable to pop dialog
2023-03-17 15:16:53.109  3876-3876  adbd                    adbd                                 E  failed to connect to socket 'localabstract:/com.example.toolmap-0/platform-1679091411264.sock': could not connect to localabstract address 'localabstract:/com.example.toolmap-0/platform-1679091411264.sock'
2023-03-17 15:16:53.150  1819-1819  OPLUS_KEVENT_RECORD     oplus_kevent                         E  OPLUS_KEVENT payload:10408,path@@/data/data/com.example.toolmap/lldb/bin/start_lldb_server.sh
2023-03-17 15:16:53.276  1819-1819  OPLUS_KEVENT_RECORD     oplus_kevent                         E  OPLUS_KEVENT payload:10408,path@@/data/data/com.example.toolmap/lldb/bin/lldb-server
2023-03-17 15:16:53.648  1819-1819  OPLUS_KEVENT_RECORD     oplus_kevent                         E  OPLUS_KEVENT payload:10408,path@@/data/data/com.example.toolmap/lldb/bin/lldb-server
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; CpuFgTime = 0 ms; CpuBgTime = 0 ms.
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; CpuKernelFgTime = 0 ms; CpuKernelBgTime = 0 ms.
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; CpuUserFgTime = 0 ms ; CpuUserBgTime = 0 ms.
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; CpuFgPower = 0.0 mAh.; CpuBgPower = 0.0 mAh.
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; AlarmFgWakeupCount = 0; AlarmBgWakeupCount = 0
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; JobFgCount = 0; JobBgCount = 0; JobFgTime = 0; JobBgTime = 0
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; SyncFgCount = 0; SyncBgCount = 0; SyncFgTime = 0; SyncBgTime = 0
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; WakeLockFgTime = 0 ms; WakeLockFgPower = 0.0 mAh.; WakeLockBgTime = 0 ms; WakeLockBgPower = 0.0 mAh.
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; ScreenFgTime = 489695 ms; ScreenFgPower = 13.602638888888889 mAh.
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgWifiRxBytes = 0 Bytes; BgWifiRxBytes = 869711312 Bytes; FgWifiTxBytes = 0 Bytes; BgWifiTxBytes = 267817176 Bytes; FgWifiRxPackets = 0 ; BgWifiRxPackets = 1001814 ; FgWifiTxPackets = 0 ; BgWifiTxPackets = 587226 ; FgWiFiScanTimeMs = 0 ; BgWiFiScanTimeMs = 0 ; FgWiFiBatchScanTimeMs = 0 ; BgWiFiBatchScanTimeMs = 0 
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgWifiRxPacketsPower = 0.0 mAh; BgWifiRxPacketsPower = 3.200239419937134 mAh; FgWifiTxPacketsPower = 0.0 mAh; BgWifiTxPacketsPower = 1.8758609294891357 mAh; FgWifiScanPower = 0.0 mAh; BgWifiScanPower = 0.0 mAh; FgWifiBatchScanPower = 0.0 mAh; BgWifiBatchScanPower = 0.0 mAh; FgWiFiTotalPower = 0.0 mAh; BgWiFiTotalPower = 5.0761003494262695 mAh.
2023-03-17 15:16:55.775  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgMobileRxBytes = 0 Bytes; BgMobileRxBytes = 0 Bytes; FgMobileTxBytes = 0 Bytes; BgMobileTxBytes = 0 Bytes; FgMobileRxPackets = 0 ; BgMobileRxPackets = 0 ; FgMobileTxPackets = 0 ; BgMobileTxPackets = 0 ; FgMobileActiveCount = 0 ; BgMobileActiveCount = 0 ; FgMobileActiveTime = 0 ; BgMobileActiveTime = 0 
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgMobileRxPacketsPower = 0.0 mAh; BgMobileRxPacketsPower = 0.0 mAh; FgMobileTxPacketsPower = 0.0 mAh; BgMobileTxPacketsPower = 0.0 mAh; FgMobileTotalPower = 0.0 mAh; BgMobileTotalPower = 0.0 mAh.
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgGpsTime = 0 ms; BgGpsTime = 0 ms.
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgGpsPower = 0.0 mAh; BgGpsPower = 0.0 mAh.
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgSensorTime = 0 ms; BgSensorTime = 0 ms.
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgSensorPower = 0.0 mAh; BgSensorPower = 0.0 mAh.
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgCameraTime = 0 ms; BgCameraTime = 0 ms
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgCameraPower = 0.0 mAh; BgCameraPower = 0.0 mAh
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgFlashLightTime = 0 ms; BgFlashLightTime = 0 ms
2023-03-17 15:16:55.776  3453-5887  Battery                 com.oplus.persist.system             E  AppStats: Uid = 10404; pkgName = com.example.toolmap; FgFlashLightPower = 0.0 mAh; BgFlashLightPower = 0.0 mAh

2

Answers


  1. There are lots of things that may go wrong, but the most common is that you did not declare the activity in AndroidManifest.xml.

    Login or Signup to reply.
  2. You should start your activity like this

    Intent myIntent = new Intent(MainActivity.this, CompassActivity.class);
    startActivity(myIntent);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search