[英]Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.ClassNotFoundException - NOT multidex related
On some android phones only the latest build of our app is crashing with 在某些Android手机上,只有我们应用的最新版本会崩溃
Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.ClassNotFoundException
It's occurring on a phone running Android 5.1.1. 它发生在运行Android 5.1.1的手机上。
The problem is NOT multidex-related
(all other answers I've googled relate to multidex
; we've had multidex
enabled in our apps for years). 这个问题
multidex-related
(我搜索过的所有其他答案都与multidex
; multidex
,我们已经在应用程序中启用了multidex
)。
I'm assuming it's related to us updating to the latest Admob, but I haven't been able to find any related advice online. 我认为这与我们更新到最新的Admob有关,但是我无法在线找到任何相关建议。
We're pulling in the following: 我们引入了以下内容:
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:4.2.0'
}
dependencies {
// NEW FUSE INTEGRATION
compile('com.upsight.android:mediation-core:2.12.0') {
exclude group: 'com.google.android.gms', module: 'play-services'
//exclude group: 'com.google.android.gms', module: 'play-services-basement'
exclude group: 'com.android.support'
exclude group: 'com.upsight.android', module: 'mediation-ad-network-u2'
exclude group: 'com.upsight.android', module: 'mediation-ad-network-m2'
exclude group: 'com.upsight.android', module: 'mediation-ad-network-ac'
exclude group: 'com.upsight.android', module: 'mediation-ad-network-al'
exclude group: 'com.upsight.android', module: 'mediation-ad-network-vungle'
}
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v13:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:multidex:1.0.3'
// compile files('libs/FlurryAnalytics_6.7.0.jar')
implementation 'com.flurry.android:analytics:11.3.0@aar'
// compile 'com.flurry.android:marketing:11.3.0@aar' ' No longer needed for Push'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-ads:17.0.0'
implementation('com.adincube.sdk:AdinCube-Java-1626ebe:2.+@aar') {
transitive = true
}
implementation 'com.google.android.ads.consent:consent-library:1.0.6'
// Fyber
implementation (name:'ia-sdk-core-release-7.3.1', ext:'aar')
implementation (name:'ia-video-kit-release-7.3.1', ext:'aar')
implementation (name:'ia-mraid-kit-release-7.3.1', ext:'aar')
implementation (name:'ia-native-kit-release-7.3.1', ext:'aar')
implementation 'com.google.code.gson:gson:2.7'
implementation ('com.google.android.gms:play-services-base:16.1.0')
//implementation ('com.google.android.gms:play-services-ads-identifier:17.2.0')
}
In this case, updating the Gradle build tools to 在这种情况下,将Gradle构建工具更新为
com.android.tools.build:gradle:3.1.3
eliminated the problem. 消除了问题。 Previously they were at
3.0.1
以前他们是
3.0.1
So, one more thing for people to try if they come across this problem! 因此,如果人们遇到此问题,还可以尝试另一件事!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.