java.lang.NoClassDefFoundError:无法解决以下问题:

我正在运行一个android react本地应用程序,并且成功完成了构建,但是当该应用程序启动时它崩溃了,我什至无法打开它。我尝试了多种在Internet上找到的解决方案,但似乎都没有用。这是我的gradle文件:


gradle.app


apply plugin: "com.android.application"


import com.android.build.OutputFile


project.ext.react = [

        nodeExecutableAndArgs : ["/usr/local/bin/node"]

];


apply from: "../../node_modules/react-native/react.gradle"


def enableProguardInReleaseBuilds = false


android {

    compileSdkVersion 26

    buildToolsVersion '26.0.1'

    defaultConfig {

        applicationId "com.tradeup"

        minSdkVersion 16

        targetSdkVersion 26

        versionCode 3

        versionName "1.7"

        ndk {

            abiFilters "armeabi-v7a", "x86"

        }

    }

    signingConfigs {

        release {

            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {

                storeFile file(MYAPP_RELEASE_STORE_FILE)

                storePassword MYAPP_RELEASE_STORE_PASSWORD

                keyAlias MYAPP_RELEASE_KEY_ALIAS

                keyPassword MYAPP_RELEASE_KEY_PASSWORD

            }

        }

    }

    buildTypes {

        release {

            minifyEnabled enableProguardInReleaseBuilds

            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"

            signingConfig signingConfigs.release

        }

    }

}


dependencies {

    compile project(':react-native-fcm')

    compile project(':react-native-code-push')

    compile project(':react-native-image-picker')

    compile project(':react-native-splash-screen')

    compile (project(':react-native-fcm')){

        exclude group: "com.google.firebase"

    }

    compile project(':react-native-svg')

    compile project(':react-native-vector-icons')

    compile project(':react-native-linear-gradient')

    compile fileTree(dir: "libs", include: ["*.jar"])

    compile "com.android.support:appcompat-v7:23.0.1"

    compile "com.facebook.react:react-native:+"  


    compile "com.google.firebase:firebase-core:11.2.0"


    compile "com.google.android.gms:play-services-base:11.2.0"



我一直在尝试修复此问题已有一段时间,并且ios版本运行良好。谢谢


富国沪深
浏览 315回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java