Firebase Performance crashing in API 19 with Google Play Services 10.2.98

孤人 提交于 2019-12-05 00:48:24

This is an old issue but posting an update for the benefit of others.

I have run into this issue my self with the exact same stack trace. My app is failing on API 19 and below, where as on 21+ it works without any issue. For me it turned out to be a MultiDex issue.

Even though I had enabled MultiDex by giving

  • multiDexEnabled true in Module gradle file under "defaultConfig" for API 21+
  • "implementation 'com.android.support:multidex:1.0.3'" in Module gradle file under "dependencies" for API 20 and below my app failed with the above exception.

I had to make changes to the manifest file and replaced the fully qualified class name of my app with "android.support.multidex.MultiDexApplication"

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myapp">
    <application
            android:name="android.support.multidex.MultiDexApplication" >
        ...
    </application>
</manifest>

Please read this page on Multidex for further details. And here is the reference for the application attribute. I have tested my app in the Firebase test labs and physical devices and it works on all versions from API 17 to API 28.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!