简体   繁体   English

Android 崩溃:java.lang.RuntimeException:在 android.app.ActivityThread.performResumeActivity

[英]Android crash: java.lang.RuntimeException: at android.app.ActivityThread.performResumeActivity

This bug occurred in internal testing (never seen in development) and has been reported so far for only one user, on one device whose specs are:此错误发生在内部测试中(从未在开发中出现过),并且迄今为止仅针对一位用户在一台设备上报告过,该设备的规格为:

  • Xiaomi Redmi 6A小米红米6A
  • Android 8.1 (SDK 27)安卓 8.1 (SDK 27)

It's also a ReactNative application built with (some probably relevant packages):它也是一个用(一些可能相关的包)构建的 ReactNative 应用程序:

  • "react-native": "~0.63.4", “反应原生”:“~0.63.4”,
  • "expo": "^41.0.0", "博览会": "^41.0.0",
  • "expo-permissions": "~12.0.1", "展览权限": "~12.0.1",

Below is the log on GooglePlay Console:以下是 GooglePlay Console 上的日志:

java.lang.RuntimeException: 
  at android.app.ActivityThread.performResumeActivity (ActivityThread.java:3657)
  at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:3697)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1690)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:176)
  at android.app.ActivityThread.main (ActivityThread.java:6662)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)
Caused by: java.lang.NullPointerException: 
  at java.util.Objects.requireNonNull (Objects.java:203)
  at expo.modules.location.LocationModule.handleForegroundLocationPermissions (LocationModule.java:16)
  at expo.modules.location.LocationModule.lambda$requestForegroundPermissionsAsync$2 (LocationModule.java)
  at expo.modules.location.LocationModule.lambda$requestForegroundPermissionsAsync$2$LocationModule (LocationModule.java)
  at expo.modules.location.-$$Lambda$LocationModule$k4oVIWX5Tq-1bJGiv_G_lWYmJ10.onResult (-.java:4)
  at org.unimodules.adapters.react.permissions.PermissionsService$createListenerWithPendingPermissionsRequest$1.onRequestPermissionsResult (PermissionsService.java:32)
  at com.facebook.react.ReactActivityDelegate$2.invoke (ReactActivityDelegate.java:20)
  at com.facebook.react.ReactActivityDelegate.onResume (ReactActivityDelegate.java:12)
  at com.facebook.react.ReactActivity.onResume (ReactActivity.java:5)
  at android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1355)
  at android.app.Activity.performResume (Activity.java:7182)
  at android.app.ActivityThread.performResumeActivity (ActivityThread.java:3632)
  at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:3697)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1690)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:176)
  at android.app.ActivityThread.main (ActivityThread.java:6662)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)

Also below is the app's MainActivity's, if it helps下面也是应用程序的 MainActivity,如果有帮助的话


    // Added automatically by Expo Config
    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        Intent intent = new Intent("onConfigurationChanged");
        intent.putExtra("newConfig", newConfig);
        sendBroadcast(intent);
    }

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(null);
    // SplashScreen.show(...) has to be called after super.onCreate(...)
    // Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually
    SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false);
  }


    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "main";
    }

    @Override
    protected ReactActivityDelegate createReactActivityDelegate() {
        return new ReactActivityDelegate(this, getMainComponentName()) {
            @Override
            protected ReactRootView createRootView() {
                return new RNGestureHandlerEnabledRootView(MainActivity.this);
            }
        };
    }
}

Any help would be highly appreciated!任何帮助将不胜感激!

I also acknowledge that any use of tools like Crashlytics would make life easier, and they aren't integrated as of now.我也承认,使用 Crashlytics 之类的任何工具都会让生活更轻松,而且目前还没有集成它们。 But I might as well do that if it's the only way it can be resolved, later on.. Thanks!但如果这是解决问题的唯一方法,我也可能会这样做,稍后..谢谢!

似乎没有授予位置许可

java.lang.NullPointerException: at java.util.Objects.requireNonNull (Objects.java:203) at expo.modules.location.LocationModule.handleForegroundLocationPermissions (LocationModule.java:16) at expo.modules.location.LocationModule.lambda$requestForegroundPermissionsAsync$2 (LocationModule.java) at expo.modules.location.LocationModule.lambda$requestForegroundPermissionsAsync$2$LocationModule (LocationModule.java)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android:java.lang.RuntimeException:在 android.app.ActivityThread.installProvider - Android: java.lang.RuntimeException: at android.app.ActivityThread.installProvider 异常:java.lang.RuntimeException 在 android.app.ActivityThread.handleReceiver - Exception : java.lang.RuntimeException at android.app.ActivityThread.handleReceiver java.lang.RuntimeException:无法创建应用程序,并且无法在android.app.ActivityThread.handleBindApplication(ActivityThread.java:4254)上创建 - java.lang.RuntimeException: Unable to create application and at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4254) Android 应用程序 java.lang.RuntimeException 错误 - Android app java.lang.RuntimeException error android-java.lang.RuntimeException - android - java.lang.RuntimeException java.lang.RuntimeException android - java.lang.RuntimeException android Android java.lang.RuntimeException - Android java.lang.RuntimeException Android - java.lang.RuntimeException:应用程序一启动就崩溃了 - Android - java.lang.RuntimeException:App is crashing as soon as it launches Android中的自定义字体:java.lang.RuntimeException - Custom Fonts in Android: java.lang.RuntimeException java.lang.RuntimeException:存根! 在Android中使用Mockito - java.lang.RuntimeException: Stub! in Android with Mockito
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM