Intermittent java.lang.NoClassDefFoundError at runtime from AdMob












5















A few of my users are crashing with an error.. the phones with this crash are Google Pixels running Android 9. However, not all Pixels crash with this configuration. The two devices that reported the crash were Google Pixel 2 (walleye) on Android 9 and Pixel XL (marlin) on Android 9. We have users with the same device and Android version that do not have the error and we have not been able to reproduce the error in an emulator.



Here is the stack trace reported:



java.lang.NoClassDefFoundError: 
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at ac.loadClass (ac.java:4)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)


Here is my build.gradle for my common library:



apply plugin: 'com.android.library'

android {
compileSdkVersion 28

libraryVariants.all { variant ->
variant.outputs.all {
def version = variant.properties.get("versionName")
def projectName = name
def formattedDate = new Date().format('yyyy-MM-dd-HHmm')
outputFileName = "${projectName}${version}-${formattedDate}.apk"
}
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 6
versionName "3.0.1"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}

dependencies {
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}
}


Here is my build.gradle for my application:



apply plugin: 'com.android.application'


android {

compileSdkVersion 28
defaultConfig {
applicationId "com.myapp"
minSdkVersion 14
targetSdkVersion 28
versionCode 9
versionName "2.6.2"
testApplicationId "com.myapp"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
signingConfig signingConfigs.appkey
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
zipAlignEnabled true
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def relativeRootDir = output.packageApplication.outputDirectory.toPath()
.relativize(rootDir.toPath()).toFile()
def finalVersionCode = versionCode
output.versionCodeOverride = finalVersionCode
outputFileName = new File(
"$relativeRootDir/release",
outputFileName.replace(".apk", "-${finalVersionCode}.apk"))
}
}
debuggable true
jniDebuggable true
}
debug {
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.3'
productFlavors {
}
}

dependencies {
implementation project(':common')
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}









share|improve this question

























  • I'm having this issue too. Did you find a solution?

    – AndroidGuy
    Jan 18 at 10:22











  • Unfortunately, not yet. It's very inconsistent. No rhyme or reason. :(

    – Ebry Dobby
    Jan 19 at 17:31
















5















A few of my users are crashing with an error.. the phones with this crash are Google Pixels running Android 9. However, not all Pixels crash with this configuration. The two devices that reported the crash were Google Pixel 2 (walleye) on Android 9 and Pixel XL (marlin) on Android 9. We have users with the same device and Android version that do not have the error and we have not been able to reproduce the error in an emulator.



Here is the stack trace reported:



java.lang.NoClassDefFoundError: 
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at ac.loadClass (ac.java:4)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)


Here is my build.gradle for my common library:



apply plugin: 'com.android.library'

android {
compileSdkVersion 28

libraryVariants.all { variant ->
variant.outputs.all {
def version = variant.properties.get("versionName")
def projectName = name
def formattedDate = new Date().format('yyyy-MM-dd-HHmm')
outputFileName = "${projectName}${version}-${formattedDate}.apk"
}
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 6
versionName "3.0.1"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}

dependencies {
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}
}


Here is my build.gradle for my application:



apply plugin: 'com.android.application'


android {

compileSdkVersion 28
defaultConfig {
applicationId "com.myapp"
minSdkVersion 14
targetSdkVersion 28
versionCode 9
versionName "2.6.2"
testApplicationId "com.myapp"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
signingConfig signingConfigs.appkey
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
zipAlignEnabled true
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def relativeRootDir = output.packageApplication.outputDirectory.toPath()
.relativize(rootDir.toPath()).toFile()
def finalVersionCode = versionCode
output.versionCodeOverride = finalVersionCode
outputFileName = new File(
"$relativeRootDir/release",
outputFileName.replace(".apk", "-${finalVersionCode}.apk"))
}
}
debuggable true
jniDebuggable true
}
debug {
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.3'
productFlavors {
}
}

dependencies {
implementation project(':common')
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}









share|improve this question

























  • I'm having this issue too. Did you find a solution?

    – AndroidGuy
    Jan 18 at 10:22











  • Unfortunately, not yet. It's very inconsistent. No rhyme or reason. :(

    – Ebry Dobby
    Jan 19 at 17:31














5












5








5


2






A few of my users are crashing with an error.. the phones with this crash are Google Pixels running Android 9. However, not all Pixels crash with this configuration. The two devices that reported the crash were Google Pixel 2 (walleye) on Android 9 and Pixel XL (marlin) on Android 9. We have users with the same device and Android version that do not have the error and we have not been able to reproduce the error in an emulator.



Here is the stack trace reported:



java.lang.NoClassDefFoundError: 
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at ac.loadClass (ac.java:4)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)


Here is my build.gradle for my common library:



apply plugin: 'com.android.library'

android {
compileSdkVersion 28

libraryVariants.all { variant ->
variant.outputs.all {
def version = variant.properties.get("versionName")
def projectName = name
def formattedDate = new Date().format('yyyy-MM-dd-HHmm')
outputFileName = "${projectName}${version}-${formattedDate}.apk"
}
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 6
versionName "3.0.1"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}

dependencies {
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}
}


Here is my build.gradle for my application:



apply plugin: 'com.android.application'


android {

compileSdkVersion 28
defaultConfig {
applicationId "com.myapp"
minSdkVersion 14
targetSdkVersion 28
versionCode 9
versionName "2.6.2"
testApplicationId "com.myapp"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
signingConfig signingConfigs.appkey
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
zipAlignEnabled true
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def relativeRootDir = output.packageApplication.outputDirectory.toPath()
.relativize(rootDir.toPath()).toFile()
def finalVersionCode = versionCode
output.versionCodeOverride = finalVersionCode
outputFileName = new File(
"$relativeRootDir/release",
outputFileName.replace(".apk", "-${finalVersionCode}.apk"))
}
}
debuggable true
jniDebuggable true
}
debug {
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.3'
productFlavors {
}
}

dependencies {
implementation project(':common')
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}









share|improve this question
















A few of my users are crashing with an error.. the phones with this crash are Google Pixels running Android 9. However, not all Pixels crash with this configuration. The two devices that reported the crash were Google Pixel 2 (walleye) on Android 9 and Pixel XL (marlin) on Android 9. We have users with the same device and Android version that do not have the error and we have not been able to reproduce the error in an emulator.



Here is the stack trace reported:



java.lang.NoClassDefFoundError: 
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at ac.loadClass (ac.java:4)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at jq.b (jq.java:3)
at jp.a (jp.java:3)
at jr.a (jr.java:19)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:15)
at iv.a (iv.java:19)
at iv.run (iv.java:8)


Here is my build.gradle for my common library:



apply plugin: 'com.android.library'

android {
compileSdkVersion 28

libraryVariants.all { variant ->
variant.outputs.all {
def version = variant.properties.get("versionName")
def projectName = name
def formattedDate = new Date().format('yyyy-MM-dd-HHmm')
outputFileName = "${projectName}${version}-${formattedDate}.apk"
}
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 6
versionName "3.0.1"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}

dependencies {
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}
}


Here is my build.gradle for my application:



apply plugin: 'com.android.application'


android {

compileSdkVersion 28
defaultConfig {
applicationId "com.myapp"
minSdkVersion 14
targetSdkVersion 28
versionCode 9
versionName "2.6.2"
testApplicationId "com.myapp"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
signingConfig signingConfigs.appkey
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
zipAlignEnabled true
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def relativeRootDir = output.packageApplication.outputDirectory.toPath()
.relativize(rootDir.toPath()).toFile()
def finalVersionCode = versionCode
output.versionCodeOverride = finalVersionCode
outputFileName = new File(
"$relativeRootDir/release",
outputFileName.replace(".apk", "-${finalVersionCode}.apk"))
}
}
debuggable true
jniDebuggable true
}
debug {
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.3'
productFlavors {
}
}

dependencies {
implementation project(':common')
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}






android admob noclassdeffounderror






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 '18 at 13:33









Aniruddh Parihar

2,21911129




2,21911129










asked Nov 28 '18 at 13:06









Ebry DobbyEbry Dobby

262




262













  • I'm having this issue too. Did you find a solution?

    – AndroidGuy
    Jan 18 at 10:22











  • Unfortunately, not yet. It's very inconsistent. No rhyme or reason. :(

    – Ebry Dobby
    Jan 19 at 17:31



















  • I'm having this issue too. Did you find a solution?

    – AndroidGuy
    Jan 18 at 10:22











  • Unfortunately, not yet. It's very inconsistent. No rhyme or reason. :(

    – Ebry Dobby
    Jan 19 at 17:31

















I'm having this issue too. Did you find a solution?

– AndroidGuy
Jan 18 at 10:22





I'm having this issue too. Did you find a solution?

– AndroidGuy
Jan 18 at 10:22













Unfortunately, not yet. It's very inconsistent. No rhyme or reason. :(

– Ebry Dobby
Jan 19 at 17:31





Unfortunately, not yet. It's very inconsistent. No rhyme or reason. :(

– Ebry Dobby
Jan 19 at 17:31












1 Answer
1






active

oldest

votes


















0














As stated in this answer, it appears there's a temporary workaround while we wait for this to be officially fixed from Google. Maps library is also affected.



Just put this tag into the Manifest file:



<uses-library
android:name="org.apache.http.legacy"
android:required="false" />


I tried it and it appears to be working.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53520180%2fintermittent-java-lang-noclassdeffounderror-at-runtime-from-admob%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    As stated in this answer, it appears there's a temporary workaround while we wait for this to be officially fixed from Google. Maps library is also affected.



    Just put this tag into the Manifest file:



    <uses-library
    android:name="org.apache.http.legacy"
    android:required="false" />


    I tried it and it appears to be working.






    share|improve this answer




























      0














      As stated in this answer, it appears there's a temporary workaround while we wait for this to be officially fixed from Google. Maps library is also affected.



      Just put this tag into the Manifest file:



      <uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />


      I tried it and it appears to be working.






      share|improve this answer


























        0












        0








        0







        As stated in this answer, it appears there's a temporary workaround while we wait for this to be officially fixed from Google. Maps library is also affected.



        Just put this tag into the Manifest file:



        <uses-library
        android:name="org.apache.http.legacy"
        android:required="false" />


        I tried it and it appears to be working.






        share|improve this answer













        As stated in this answer, it appears there's a temporary workaround while we wait for this to be officially fixed from Google. Maps library is also affected.



        Just put this tag into the Manifest file:



        <uses-library
        android:name="org.apache.http.legacy"
        android:required="false" />


        I tried it and it appears to be working.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 20 at 21:11









        AndroidGuyAndroidGuy

        497417




        497417
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53520180%2fintermittent-java-lang-noclassdeffounderror-at-runtime-from-admob%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Lallio

            Unable to find Lightning Node

            Futebolista