Pixel 2 XL 上的本机异常

2024-04-21

我在 Pixel 2 XL 上运行应用程序时遇到一些问题。

昨天,它运行良好,并且该应用程序按预期在模拟器上运行。

Behavior

应用程序第一次启动时可以正常工作,再次启动会导致本机代码出现异常。

我的应用程序没有本机库

例外

2021-03-23 00:05:17.868 14827-14827/? A/DEBUG: Build fingerprint: 'google/taimen/taimen:11/RP1A.201005.004.A1/6934943:user/release-keys'
2021-03-23 00:05:17.868 14827-14827/? A/DEBUG: Revision: 'rev_10'
2021-03-23 00:05:17.868 14827-14827/? A/DEBUG: ABI: 'arm64'
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG: Timestamp: 2021-03-23 00:05:17+0000
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG: pid: 14708, tid: 14708, name: my_app.debug  >>> my.app.package.name.debug <<<
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG: uid: 10364
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG: Cause: null pointer dereference
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x0  0000000000000000  x1  00000070811181ec  x2  7265646f63654400  x3  726f7463656c6553
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x4  0000000000000000  x5  0000000000000000  x6  716e7362646b6452  x7  7f7f7f7f7f7f7f7f
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x8  0101010101010101  x9  0000007080e75000  x10 00000060000373c8  x11 0000007081118488
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x12 00000000ffffffff  x13 0000000000000000  x14 4b3d092f234ec266  x15 cae6c696f68e9634
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x16 00000070851be0f0  x17 000000736eb69870  x18 000000737463e000  x19 0000000000000003
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x20 0000000000000000  x21 000000600001ff40  x22 0000007fdddfe528  x23 00000060000373c8
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x24 00000060000373d8  x25 0000000000000000  x26 0000007fdddfe7c0  x27 0000000000000000
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     x28 00000060000b81a0  x29 0000007fdddfe480
2021-03-23 00:05:17.869 14827-14827/? A/DEBUG:     lr  00000070841499dc  sp  0000007fdddfe450  pc  00000070841499dc  pst 0000000080000000
2021-03-23 00:05:17.870 14827-14827/? A/DEBUG: backtrace:
2021-03-23 00:05:17.870 14827-14827/? A/DEBUG:       #00 pc 00000000034529dc  /data/app/~~XYsxcfPioD_lXrykYiuRug==/com.google.android.webview-BV9BYYU2jmEepqoY1a5GdA==/base.apk!libmonochrome.so (offset 0x2d3000) (BuildId: 95f822edbc9f6b7eae5123e2b88ce8cf430204b4)
2021-03-23 00:05:18.270 921-921/? E/tombstoned: Tombstone written to: /data/tombstones/tombstone_19

PlayStore 上该应用程序的当前版本也遇到了同样的问题,因此我非常有信心这个问题不是由我的代码最近发生的更改引起的。

我发现了什么

我注意到该异常引用了libmonochrome.so我读到这可能与 WebView 有关,我的应用程序上确实有一个 WebView,但它是次要活动,并且在应用程序启动时不会启动。

删除此活动没有任何效果。

如果我清除存储,应用程序就会开始工作,但是一旦我尝试重新打开它,应用程序就会关闭,并立即最小化,它会停留在后台并显示黑屏。

这对我来说没有多大意义,我评论了启动主要活动的代码,所以基本上,我只是运行启动屏幕。

我在模拟器上运行该项目没有任何问题,模拟器显示 Splash 活动并执行它而不会导致本机异常。

SplashActivity.kt

class SplashActivity : BaseActivity() {
   override fun onCreateActivity(savedInstanceState: Bundle?) {
       setContentView(R.layout.activity_splash)
   }
   // commented code...
}

基本活动.kt

abstract class BaseActivity : AppCompatActivity() {

   abstract fun onCreateActivity(savedInstanceState: Bundle?)

   override fun onCreate(savedInstanceState: Bundle?) {
       val extras = intent.getBundleExtra("saved_state")
       super.onCreate(savedInstanceState ?: extras)
       requestWindowFeature(Window.FEATURE_NO_TITLE)
       window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN)

       onCreateActivity(savedInstanceState ?: extras)
}
   // used for night mode transitions
   override fun onConfigurationChanged(newConfig: Configuration) {
       super.onConfigurationChanged(newConfig)
       PreferenceManager.getDefaultSharedPreferences(this).edit().putInt(UI_MODE_PREF_KEY, newConfig.uiMode).apply()
       AppCompatDelegate.setDefaultNightMode(newConfig.uiMode)
       transitionRecreate()
}
   // used for night mode transitions
   protected open fun transitionRecreate() {
       val bundle = Bundle()
       onSaveInstanceState(bundle)
       val intent = Intent(this, javaClass)
       intent.putExtra("saved_state", bundle)
       intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
       overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out)
       startActivity(intent)
   }
}

apply plugin: 'com.android.application'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs.kotlin"
apply plugin: 'com.google.firebase.crashlytics'

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
        exclude("META-INF/*.kotlin_module")
    }
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
    compileSdkVersion 30
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "my.package"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 77
        versionName "2.3v"
       // vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        // If set to 'true', enables the instrumentation class to start and stop profiling.
        // If set to false (default), profiling occurs the entire time the instrumentation
        // class is running.
        testHandleProfiling true
        // If set to 'true', indicates that the Android system should run the instrumentation
        // class as a functional test. The default value is 'false'
        testFunctionalTest true
    }


    testOptions {
        unitTests{
            returnDefaultValues = true
        }
    }

    signingConfigs {
        config {
            Properties properties = new Properties()
            properties.load(project.rootProject.file('local.properties').newDataInputStream())
            storeFile file(properties.getProperty('storeFile'))
            keyAlias properties.getProperty('keyAlias')
            storePassword properties.getProperty('storePassword')
            keyPassword properties.getProperty('keyPassword')
        }
    }

    android.buildFeatures.dataBinding = true

    dexOptions {
        javaMaxHeapSize '4g'
    }


    buildTypes {
        release {
            signingConfig signingConfigs.config
            minifyEnabled true
            shrinkResources true
            debuggable true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            proguardFile "proguard-gson.pro"
            proguardFile "proguard-google-play-services.pro"
            proguardFile "proguard-support-v7-appcompat.pro"
            proguardFile "proguard-joda.pro"
        }
        debug {
            debuggable true
            signingConfig signingConfigs.config
            applicationIdSuffix ".debug"
            firebaseCrashlytics {
                // If you don't need crash reporting for your debug build,
                // you can speed up your build by disabling mapping file uploading.
                mappingFileUploadEnabled false
            }
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(':MaterialDialog')

    // Lottie Animation Library
    implementation 'com.airbnb.android:lottie:3.4.4'

    /* Multidex */
    implementation 'androidx.multidex:multidex:2.0.1'


    /* FACEBOOK  */
    implementation 'com.facebook.android:facebook-android-sdk:8.0.0'


    implementation 'com.github.wrdlbrnft:sorted-list-adapter:0.2.0.1'
    implementation 'com.github.chrisbanes:PhotoView:2.1.3'
    implementation 'com.scottyab:aescrypt:0.0.1'
    //implementation 'com.github.traex.rippleeffect:library:1.3'
    implementation 'com.squareup.picasso:picasso:2.71828'
    //implementation 'com.miguelcatalan:materialsearchview:1.4.0'
    implementation 'im.dacer:AndroidCharts:1.0.4'
    implementation 'com.github.greenfrvr:rubber-loader:1.1.2@aar'

    /* SUPPORT LIBRARY */
    implementation "com.google.android.play:core:1.10.0"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation "androidx.recyclerview:recyclerview:1.1.0"
    implementation "androidx.legacy:legacy-support-v4:1.0.0"
    implementation "androidx.preference:preference-ktx:1.1.1"
    implementation "androidx.annotation:annotation:1.1.0"
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation "androidx.palette:palette-ktx:1.0.0"
    implementation "androidx.fragment:fragment-ktx:1.3.1"

    /* FIREBASE */
    implementation platform('com.google.firebase:firebase-bom:26.0.0')

    implementation 'com.google.firebase:firebase-crashlytics-ktx'
    implementation 'com.google.firebase:firebase-core:18.0.2'
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.firebaseui:firebase-ui-auth:7.1.0'
    implementation 'com.firebaseui:firebase-ui-database:7.1.0'
    implementation 'com.firebaseui:firebase-ui-auth:7.1.0'

    implementation 'com.google.firebase:firebase-messaging-ktx:21.0.1'
    implementation "com.google.firebase:firebase-auth-ktx:20.0.3"
    implementation "com.google.firebase:firebase-storage-ktx:19.2.1"
    implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
    implementation "com.google.firebase:firebase-ads:19.8.0"
    implementation "com.google.firebase:firebase-config-ktx:20.0.4"
    implementation "com.google.firebase:firebase-perf-ktx:19.1.1"
    implementation "com.google.firebase:firebase-database-ktx:19.7.0"
    implementation "com.google.firebase:firebase-appindexing:19.2.0"
    implementation 'com.google.firebase:firebase-firestore-ktx:22.1.1'
    implementation 'com.google.firebase:firebase-config-ktx:20.0.4'
    implementation 'com.google.firebase:firebase-functions-ktx:19.2.0'
    implementation 'com.google.guava:guava:29.0-jre'

    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

    implementation 'com.chaos.view:pinview:1.3.2'
    //For playing .gif images
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.21'


    // Room components
    implementation "androidx.room:room-runtime:2.2.6"
    kapt "androidx.room:room-compiler:2.2.6"
    androidTestImplementation "androidx.room:room-testing:2.2.6"


    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    implementation "androidx.lifecycle:lifecycle-common-java8:2.3.0"


    // Lifecycle components
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    // annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.1.0"

    /* Retrofit */
    // Max version to support APIS below 21
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:retrofit-converters:2.6.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
    implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'


    implementation 'joda-time:joda-time:2.10.6'

    debugImplementation 'com.sothree.slidinguppanel:library:3.4.0'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.31"


    implementation 'com.android.billingclient:billing:3.0.3'
    implementation 'com.android.billingclient:billing-ktx:3.0.3'

    kapt "com.android.databinding:compiler:3.3.2"

    //shimmer
    implementation 'com.facebook.shimmer:shimmer:0.5.0'
    // Kotlin + coroutines
    implementation "androidx.work:work-runtime-ktx:2.5.0"
    implementation "androidx.room:room-ktx:2.2.6"

    implementation "com.theartofdev.edmodo:android-image-cropper:2.8.0"

    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.2.1'
    implementation "org.jetbrains.kotlin:kotlin-reflect:1.4.31"

    implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'

    implementation 'com.akexorcist:RoundCornerProgressBar:2.0.3'

    implementation 'com.google.android.ads.consent:consent-library:1.0.8'

    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'com.google.android:flexbox:2.0.1'
    implementation 'nl.bryanderidder:themed-toggle-button-group:1.1.0'

    implementation 'com.github.strooooke:appbarsyncedfab:v0.5'

    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'

    implementation 'jp.wasabeef:picasso-transformations:2.2.1'


    // Unit Testing .\
    implementation 'com.google.dagger:dagger:2.31.2'
    kapt 'com.google.dagger:dagger-compiler:2.31.2'
    implementation 'com.google.dagger:dagger-android:2.29.1'
    kapt 'com.google.dagger:dagger-android-processor:2.29.1'

    kaptAndroidTest 'com.google.dagger:dagger-compiler:2.31.2'

    debugImplementation 'androidx.fragment:fragment-ktx:1.3.1'
    debugImplementation ('androidx.fragment:fragment-testing:1.3.0-alpha08', {
        exclude group: 'androidx.test', module: 'core'
    })

    testImplementation 'junit:junit:4.13.2'

    androidTestImplementation 'androidx.test:core:1.3.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test:rules:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    androidTestImplementation 'org.mockito:mockito-core:3.7.7'
    androidTestImplementation 'org.mockito:mockito-android:3.5.11'
    androidTestImplementation "androidx.navigation:navigation-testing:2.3.4"
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
    androidTestImplementation "androidx.work:work-testing:2.5.0"
}

kapt {
    generateStubs = true
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android-extensions'
repositories {
    mavenCentral()
}

UPDATE

我可能会有所收获。

所以我克隆了我的项目并开始删除几乎所有内容,我只使用以下命令运行应用程序Application类和SplashActivity

仍然是同样的错误,所以我开始删除 Application 类上的内容

当我删除这一行时

MobileAds.initialize(this)

答对了!有效。

删除这一行解决了问题,我试图理解为什么会发生这种情况。

UPDATE 2

多家新闻媒体报道称,谷歌正在尝试解决该问题


我有同样的问题,我找到了下一个“临时”解决方案,从设备中卸载 WEBVIEW 更新。

网页浏览:https://play.google.com/store/apps/details?id=com.google.android.webview https://play.google.com/store/apps/details?id=com.google.android.webview

SOURSE:

这对我有用。

UPDATE

Google 昨天(3 月 22 日)发布了 WEBVIEW 和 GOOGLE CHROME 应用程序的更新,下载该更新后问题将得到解决。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Pixel 2 XL 上的本机异常 的相关文章

随机推荐

  • 时间:2019-03-17 标签:c#makeShowItemToolTipssticky

    我有一个 ListView 其中几个项目的文本超出了列宽 ShowItemToolTips 意味着我可以将鼠标悬停在列上并查看全文 这很棒 然而 对于很长的文本 它会在有时间阅读所有内容之前消失 所以我想让它保持更长时间 或者可能直到手动关
  • 通过“递归”策略进行合并

    我知道 git merge 递归实际上发生在有超过 1 个共同祖先的情况下 并且它将创建一个虚拟提交来合并这些共同祖先 然后再继续合并最近的提交 抱歉 我不确定是否应该有一个术语这 但我一直在尝试查找有关 git merge 递归策略实际如
  • 如何从所有应用程序加载 Django 装置?

    我在 Django 应用程序中使用固定装置 但只有两个应用程序加载了固定装置 当我使用 verbosity 2 手动运行 loaddata 时 我可以看到它只在两个应用程序中查找 尽管我在内部创建了更多的固定装置目录 所有应用程序均已正确安
  • django get_or_create 返回错误:“tuple”对象没有属性

    我是 django 新手 我正在尝试使用 get or create 模型函数 但即使我的模型中有该属性 我也会收到错误 AttributeError at professor adicionar compromisso tuple obj
  • 创建自定义颜色集 TinyMCE

    我已经能够为 TinyMCE 创建自己的字体颜色选择器 但是调色板链接到原始颜色选择器 我想做的是使我的自定义颜色选择器完全独立于原始颜色选择器 这样我可以同时显示两者 这是我当前的代码 这可以工作 但是两个按钮的调色板是相同的 tinym
  • Accept_nested_attributes_for :allow_destroy, :_destroy 不起作用

    我有一个 Rails 4 1 应用程序 它使用了一些值得注意的技术 简单的形式 茧 我在销毁嵌套属性的记录时遇到问题 基于一些冗长的研究 我相信我的代码是正确的 但是我可能遗漏了一些愚蠢的东西 Model has many staff se
  • 具有固定键的字典上的多线程

    我有一本带有固定键集合的字典 是我在程序开始时创建的 后来 我有一些线程用值更新字典 一旦线程启动 就不会添加或删除任何对 每个线程都有自己的密钥 意义 只有一个线程会访问某个键 该线程可能更新值 问题是 我应该锁定字典吗 UPDATE 谢
  • jQuery 的元素或类喜欢选择器?

    无论出于何种原因 我将这些课程称为 main sub1 main sub2等等 别介意为什么我不能拥有 main sub 有没有一种方法可以用 jQuery 来获取包含属性的类 main Using class main 将选择其类名的所有
  • wso2 svn 更新 - E205011:处理一个或多个外部定义时发生故障

    我在尝试着svn update4 0 0平台分支 却屡次碰到错误 E205011 Failure occurred processing one or more externals definitions My svn info outpu
  • 将字符串作为指针或文字传递时,strcmp() 返回值不一致

    我正在玩strcmp当我注意到这一点时 这是代码 include
  • 通过引用的部分数组

    我的问题很简单 是否可以像在 C 中那样 通过引用检索 VBA 中数组的两个部分 自从我用 C 编写代码以来已经有一段时间了 所以我不太记得我现在是怎么做的 如果我记得的话 也许我会举个例子 我想做的是按单个 Double 类型属性对对象数
  • C++中的随机函数

    有没有一个函数可以生成指定范围内的k个随机数 例如 我想要 5 个 0 到 100 之间的随机数 带或不带替换 你可以使用std generate n http en cppreference com w cpp algorithm gen
  • 如何在 Javascript 中使用 getter 和 setter

    有人可以向我解释一下为什么这段简单的代码不起作用吗 var user get name return this name set name value this name value user name David 当我将其放入 Firef
  • 从 Graph API 显示 [图像][url]

    构建 Facebook 视频应用程序 用户可以通过在应用程序og like中使用来收藏视频 I use response facebook gt api me og likes GET 我会得到 data object id 1399918
  • 如何在云中的 Ubuntu 20.04 上运行 Gnome 桌面

    在 Google 搜索在云实例上运行 Gnome 桌面或仅桌面 找到 Xfce4 信息 后 我在 Digital Ocean 找到了一些指南 例如 在 Ubuntu 20 04LTS 上安装和配置 VNC https www digital
  • 为什么在 bash 中睡眠并等待?

    我无法理解此服务的启动命令docker compose yml https github com wmnnd nginx certbot blob master docker compose yml yml 中的两行相关内容是 comman
  • 在类新实例上使用 Spring @Autowired

    我对Spring不太熟悉 我有以下情况 存储库类 Repository public class MyRepository 使用存储库类的类 public class MyClass extends AbstractClass Autowi
  • Mac DMG 怪事 - 签名和“损坏”的应用程序

    我的 Gatekeeper 设置是 App Store 和已识别的开发人员 我有一个带有签名应用程序的 DMG 当我安装 DMG 并在本地运行它时 它可以工作 当我将相同的 DMG 上传到我们的服务器 通过 http 下载它 通过 http
  • PHP - 如何更新 txt 文件中的 JSON 数据?

    这是保存在文件中的 JSON 数据示例data txt name yekky name mussie name jessecasicas many rows 我想更新该文件 使其看起来像这样 name yekky num 1 name mu
  • Pixel 2 XL 上的本机异常

    我在 Pixel 2 XL 上运行应用程序时遇到一些问题 昨天 它运行良好 并且该应用程序按预期在模拟器上运行 Behavior 应用程序第一次启动时可以正常工作 再次启动会导致本机代码出现异常 我的应用程序没有本机库 例外 2021 03