Java exception in 'NativeModules' java.lang.NoClassFoundError: com.google.firebase.auth.PhoneAuthCredentials












0















I am getting this error while running the app. I have everything setup for firebase auth and I am not using Phone Auth, so this error seems little weird.

This is my android/build.gradle file.



    buildscript {
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:4.0.1'
}
}


This is my android/app/build.gradle file



android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.plastinction"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}

dependencies {
compile(project(':react-native-firebase')) {
transitive = false
}
compile project(':react-native-image-picker')
compile project(':react-native-vector-icons')
compile project(':rn-fetch-blob')
compile project(':react-native-pdf')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
compile 'com.android.support:multidex:1.0.1'
compile "com.facebook.react:react-native:+" // From node_modules
compile 'com.google.firebase:firebase-core:16.0.1'
compile 'com.google.firebase:firebase-auth:11.8.0'

}


This is my Package.json



"dependencies": {
"firebase": "^5.5.8",
"native-base": "^2.7.1",
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-communications": "^2.1.3",
"react-native-datepicker": "1.7.1",
"react-native-firebase": "3.2.2",
"react-native-image-picker": "0.26.10",
"react-native-loader": "^1.2.1",
"react-native-pdf": "4.0.0",
"react-native-router-flux": "^4.0.1",
"react-native-vector-icons": "^4.6.0",
"rn-fetch-blob": "^0.10.11"
},
"devDependencies": {
"babel-jest": "22.4.4",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.4",
"react-test-renderer": "16.3.1"
}


My build gets successful, but this error occures at app loading, Can someone help?










share|improve this question





























    0















    I am getting this error while running the app. I have everything setup for firebase auth and I am not using Phone Auth, so this error seems little weird.

    This is my android/build.gradle file.



        buildscript {
    repositories {
    maven {
    url 'https://maven.google.com/'
    name 'Google'
    }
    jcenter()
    }
    dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'
    classpath 'com.google.gms:google-services:4.0.1'
    }
    }


    This is my android/app/build.gradle file



    android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
    applicationId "com.plastinction"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 1
    versionName "1.0"
    ndk {
    abiFilters "armeabi-v7a", "x86"
    }
    }
    splits {
    abi {
    reset()
    enable enableSeparateBuildPerCPUArchitecture
    universalApk false // If true, also generate a universal APK
    include "armeabi-v7a", "x86"
    }
    }
    buildTypes {
    release {
    minifyEnabled enableProguardInReleaseBuilds
    proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
    }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
    variant.outputs.each { output ->
    // For each separate APK per architecture, set a unique version code as described here:
    // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
    def versionCodes = ["armeabi-v7a":1, "x86":2]
    def abi = output.getFilter(OutputFile.ABI)
    if (abi != null) { // null for the universal-debug, universal-release variants
    output.versionCodeOverride =
    versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
    }
    }
    }
    }

    dependencies {
    compile(project(':react-native-firebase')) {
    transitive = false
    }
    compile project(':react-native-image-picker')
    compile project(':react-native-vector-icons')
    compile project(':rn-fetch-blob')
    compile project(':react-native-pdf')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    compile 'com.android.support:multidex:1.0.1'
    compile "com.facebook.react:react-native:+" // From node_modules
    compile 'com.google.firebase:firebase-core:16.0.1'
    compile 'com.google.firebase:firebase-auth:11.8.0'

    }


    This is my Package.json



    "dependencies": {
    "firebase": "^5.5.8",
    "native-base": "^2.7.1",
    "react": "16.3.1",
    "react-native": "0.55.4",
    "react-native-communications": "^2.1.3",
    "react-native-datepicker": "1.7.1",
    "react-native-firebase": "3.2.2",
    "react-native-image-picker": "0.26.10",
    "react-native-loader": "^1.2.1",
    "react-native-pdf": "4.0.0",
    "react-native-router-flux": "^4.0.1",
    "react-native-vector-icons": "^4.6.0",
    "rn-fetch-blob": "^0.10.11"
    },
    "devDependencies": {
    "babel-jest": "22.4.4",
    "babel-preset-react-native": "4.0.0",
    "jest": "22.4.4",
    "react-test-renderer": "16.3.1"
    }


    My build gets successful, but this error occures at app loading, Can someone help?










    share|improve this question



























      0












      0








      0








      I am getting this error while running the app. I have everything setup for firebase auth and I am not using Phone Auth, so this error seems little weird.

      This is my android/build.gradle file.



          buildscript {
      repositories {
      maven {
      url 'https://maven.google.com/'
      name 'Google'
      }
      jcenter()
      }
      dependencies {
      classpath 'com.android.tools.build:gradle:2.2.3'
      classpath 'com.google.gms:google-services:4.0.1'
      }
      }


      This is my android/app/build.gradle file



      android {
      compileSdkVersion rootProject.ext.compileSdkVersion
      buildToolsVersion rootProject.ext.buildToolsVersion

      defaultConfig {
      applicationId "com.plastinction"
      minSdkVersion rootProject.ext.minSdkVersion
      targetSdkVersion rootProject.ext.targetSdkVersion
      versionCode 1
      versionName "1.0"
      ndk {
      abiFilters "armeabi-v7a", "x86"
      }
      }
      splits {
      abi {
      reset()
      enable enableSeparateBuildPerCPUArchitecture
      universalApk false // If true, also generate a universal APK
      include "armeabi-v7a", "x86"
      }
      }
      buildTypes {
      release {
      minifyEnabled enableProguardInReleaseBuilds
      proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
      }
      }
      // applicationVariants are e.g. debug, release
      applicationVariants.all { variant ->
      variant.outputs.each { output ->
      // For each separate APK per architecture, set a unique version code as described here:
      // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
      def versionCodes = ["armeabi-v7a":1, "x86":2]
      def abi = output.getFilter(OutputFile.ABI)
      if (abi != null) { // null for the universal-debug, universal-release variants
      output.versionCodeOverride =
      versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
      }
      }
      }
      }

      dependencies {
      compile(project(':react-native-firebase')) {
      transitive = false
      }
      compile project(':react-native-image-picker')
      compile project(':react-native-vector-icons')
      compile project(':rn-fetch-blob')
      compile project(':react-native-pdf')
      compile fileTree(dir: "libs", include: ["*.jar"])
      compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
      compile 'com.android.support:multidex:1.0.1'
      compile "com.facebook.react:react-native:+" // From node_modules
      compile 'com.google.firebase:firebase-core:16.0.1'
      compile 'com.google.firebase:firebase-auth:11.8.0'

      }


      This is my Package.json



      "dependencies": {
      "firebase": "^5.5.8",
      "native-base": "^2.7.1",
      "react": "16.3.1",
      "react-native": "0.55.4",
      "react-native-communications": "^2.1.3",
      "react-native-datepicker": "1.7.1",
      "react-native-firebase": "3.2.2",
      "react-native-image-picker": "0.26.10",
      "react-native-loader": "^1.2.1",
      "react-native-pdf": "4.0.0",
      "react-native-router-flux": "^4.0.1",
      "react-native-vector-icons": "^4.6.0",
      "rn-fetch-blob": "^0.10.11"
      },
      "devDependencies": {
      "babel-jest": "22.4.4",
      "babel-preset-react-native": "4.0.0",
      "jest": "22.4.4",
      "react-test-renderer": "16.3.1"
      }


      My build gets successful, but this error occures at app loading, Can someone help?










      share|improve this question
















      I am getting this error while running the app. I have everything setup for firebase auth and I am not using Phone Auth, so this error seems little weird.

      This is my android/build.gradle file.



          buildscript {
      repositories {
      maven {
      url 'https://maven.google.com/'
      name 'Google'
      }
      jcenter()
      }
      dependencies {
      classpath 'com.android.tools.build:gradle:2.2.3'
      classpath 'com.google.gms:google-services:4.0.1'
      }
      }


      This is my android/app/build.gradle file



      android {
      compileSdkVersion rootProject.ext.compileSdkVersion
      buildToolsVersion rootProject.ext.buildToolsVersion

      defaultConfig {
      applicationId "com.plastinction"
      minSdkVersion rootProject.ext.minSdkVersion
      targetSdkVersion rootProject.ext.targetSdkVersion
      versionCode 1
      versionName "1.0"
      ndk {
      abiFilters "armeabi-v7a", "x86"
      }
      }
      splits {
      abi {
      reset()
      enable enableSeparateBuildPerCPUArchitecture
      universalApk false // If true, also generate a universal APK
      include "armeabi-v7a", "x86"
      }
      }
      buildTypes {
      release {
      minifyEnabled enableProguardInReleaseBuilds
      proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
      }
      }
      // applicationVariants are e.g. debug, release
      applicationVariants.all { variant ->
      variant.outputs.each { output ->
      // For each separate APK per architecture, set a unique version code as described here:
      // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
      def versionCodes = ["armeabi-v7a":1, "x86":2]
      def abi = output.getFilter(OutputFile.ABI)
      if (abi != null) { // null for the universal-debug, universal-release variants
      output.versionCodeOverride =
      versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
      }
      }
      }
      }

      dependencies {
      compile(project(':react-native-firebase')) {
      transitive = false
      }
      compile project(':react-native-image-picker')
      compile project(':react-native-vector-icons')
      compile project(':rn-fetch-blob')
      compile project(':react-native-pdf')
      compile fileTree(dir: "libs", include: ["*.jar"])
      compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
      compile 'com.android.support:multidex:1.0.1'
      compile "com.facebook.react:react-native:+" // From node_modules
      compile 'com.google.firebase:firebase-core:16.0.1'
      compile 'com.google.firebase:firebase-auth:11.8.0'

      }


      This is my Package.json



      "dependencies": {
      "firebase": "^5.5.8",
      "native-base": "^2.7.1",
      "react": "16.3.1",
      "react-native": "0.55.4",
      "react-native-communications": "^2.1.3",
      "react-native-datepicker": "1.7.1",
      "react-native-firebase": "3.2.2",
      "react-native-image-picker": "0.26.10",
      "react-native-loader": "^1.2.1",
      "react-native-pdf": "4.0.0",
      "react-native-router-flux": "^4.0.1",
      "react-native-vector-icons": "^4.6.0",
      "rn-fetch-blob": "^0.10.11"
      },
      "devDependencies": {
      "babel-jest": "22.4.4",
      "babel-preset-react-native": "4.0.0",
      "jest": "22.4.4",
      "react-test-renderer": "16.3.1"
      }


      My build gets successful, but this error occures at app loading, Can someone help?







      firebase firebase-authentication react-native-android






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 '18 at 14:07









      KENdi

      5,7992821




      5,7992821










      asked Nov 19 '18 at 8:37









      VAKVAK

      215




      215
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I solved it by updating the firebase dependencies to latest version.
          Just add this instead of your firebase dependencies:



          compile 'com.google.firebase:firebase-core:16.0.4'
          compile 'com.google.firebase:firebase-auth:16.0.5'
          compile 'com.google.firebase:firebase-database:16.0.5'





          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%2f53370941%2fjava-exception-in-nativemodules-java-lang-noclassfounderror-com-google-fireba%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














            I solved it by updating the firebase dependencies to latest version.
            Just add this instead of your firebase dependencies:



            compile 'com.google.firebase:firebase-core:16.0.4'
            compile 'com.google.firebase:firebase-auth:16.0.5'
            compile 'com.google.firebase:firebase-database:16.0.5'





            share|improve this answer




























              0














              I solved it by updating the firebase dependencies to latest version.
              Just add this instead of your firebase dependencies:



              compile 'com.google.firebase:firebase-core:16.0.4'
              compile 'com.google.firebase:firebase-auth:16.0.5'
              compile 'com.google.firebase:firebase-database:16.0.5'





              share|improve this answer


























                0












                0








                0







                I solved it by updating the firebase dependencies to latest version.
                Just add this instead of your firebase dependencies:



                compile 'com.google.firebase:firebase-core:16.0.4'
                compile 'com.google.firebase:firebase-auth:16.0.5'
                compile 'com.google.firebase:firebase-database:16.0.5'





                share|improve this answer













                I solved it by updating the firebase dependencies to latest version.
                Just add this instead of your firebase dependencies:



                compile 'com.google.firebase:firebase-core:16.0.4'
                compile 'com.google.firebase:firebase-auth:16.0.5'
                compile 'com.google.firebase:firebase-database:16.0.5'






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 23 '18 at 3:47









                VAKVAK

                215




                215
































                    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%2f53370941%2fjava-exception-in-nativemodules-java-lang-noclassfounderror-com-google-fireba%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







                    這個網誌中的熱門文章

                    Xamarin.form Move up view when keyboard appear

                    Post-Redirect-Get with Spring WebFlux and Thymeleaf

                    Anylogic : not able to use stopDelay()