Задать вопрос
  • Почему вылетает приложение при переходе в другое активити?

    @mentaldeath91 Автор вопроса
    Инициализировал ToolBar в OnCreate.
    Но затуп с тулбаром остался.
    При удалении метода setSupportActionBar ругается 62476a750f154145969647.png

    А при прописывании с метода с вызовом родительского класса:
    62476af4eb21b000352612.png
  • Почему вылетает приложение при переходе в другое активити?

    @mentaldeath91 Автор вопроса
    прописан, вот так
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.testing_interface">
    
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:name=".App"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity android:name=".screens.MainActivity">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:name=".screens.detals.NoteDetailsActivity" />
        </application>
    
    </manifest>
  • Почему вылетает приложение при переходе в другое активити?

    @mentaldeath91 Автор вопроса
    Логи(полностью не вместились):
    Process: com.example.testing_interface, PID: 18742
        java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.testing_interface/com.example.testing_interface.screens.detals.NoteDetailsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3436)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3692)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2142)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:236)
    at android.app.ActivityThread.main(ActivityThread.java:7864)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)
         Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
    at androidx.appcompat.app.AppCompatDelegateImpl.<init>(AppCompatDelegateImpl.java:249)
    at androidx.appcompat.app.AppCompatDelegate.create(AppCompatDelegate.java:182)
    at androidx.appcompat.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)
    at androidx.appcompat.app.AppCompatActivity.findViewById(AppCompatActivity.java:191)
    at com.example.testing_interface.screens.detals.NoteDetailsActivity.<init>(NoteDetailsActivity.java:37)
    at java.lang.Class.newInstance(Native Method)
    at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
    at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:41)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1253)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3424)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3692) 
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2142) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:236) 
    at android.app.ActivityThread.main(ActivityThread.java:7864) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011) 
    2022-03-31 11:25:04.421 644-694/? E/libPowerHal: [perfLockCheckHdl_internal] cannot alloc handle!!! dump all user!!!
    2022-03-31 11:25:04.422 644-694/? E/libPowerHal: trigger_aee_warning skip:perf_lock_acq no more handle
    2022-03-31 11:25:04.449 1194-3333/? E/AppOps: noteOperation
        java.lang.SecurityException: Specified package android under uid 10367 but it is really 1000
    at com.android.server.appop.AppOpsService.verifyAndGetBypass(AppOpsService.java:4072)
    at com.android.server.appop.AppOpsService.noteOperationUnchecked(AppOpsService.java:3088)
    at com.android.server.appop.AppOpsService.noteOperationImpl(AppOpsService.java:3076)
    at com.android.server.appop.AppOpsService.noteOperation(AppOpsService.java:3059)
    at android.app.AppOpsManager.noteOpNoThrow(AppOpsManager.java:7675)
    at android.app.AppOpsManager.noteOp(AppOpsManager.java:7596)
    at android.app.AppOpsManager.noteOp(AppOpsManager.java:7538)
    at com.android.server.usage.UsageStatsService$BinderService.hasPermission(UsageStatsService.java:1419)
    at com.android.server.usage.UsageStatsService$BinderService.queryUsageStats(UsageStatsService.java:1486)
    at android.app.usage.UsageStatsManager.queryUsageStats(UsageStatsManager.java:443)
    at com.android.server.am.PreloadManager.checkAppCared(PreloadManager.java:341)
    at com.android.server.am.PreloadManager.reportKilledReason(PreloadManager.java:124)
    at com.android.server.am.PreloadController.notifyInternal(PreloadController.java:84)
    at com.android.server.am.PreloadController.notify(PreloadController.java:70)
    at com.android.server.am.ProcessManagerService.recordKillProcessEventIfNeeded(ProcessManagerService.java:1353)
    at com.android.server.am.ProcessManagerService$LocalService.recordKillProcessEventIfNeeded(ProcessManagerService.java:2163)
    at com.android.server.am.ProcessRecordInjector.reportKillProcessEvent(ProcessRecordInjector.java:367)
    at com.android.server.am.ProcessRecordInjector.reportKillProcessEvent(ProcessRecordInjector.java:341)
    at com.android.server.am.ActivityManagerService.reportKillProcessEvent(ActivityManagerService.java:21159)
    at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5051)
    at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3002)
    at android.os.Binder.execTransactInternal(Binder.java:1159)
    at android.os.Binder.execTransact(Binder.java:1123)
    2022-03-31 11:25:04.479 644-694/? E/libPowerHal: [perfLockCheckHdl_internal] cannot alloc handle!!! dump all user!!!
    2022-03-31 11:25:04.480 644-694/? E/libPowerHal: trigger_aee_warning skip:perf_lock_acq no more handle