混合开发引起的couldn't find libflutter.so

couldn’t find libflutter.so

需要在 app module下配置如下,主要配置defaultConfig杰殿下的ndk和builTypes下的debug下的ndk和release下的ndk

android {
    compileSdkVersion compile_sdk_version
    buildToolsVersion build_tools_version

    defaultConfig {
        minSdkVersion min_sdk_version
        targetSdkVersion target_sdk_version
        versionCode 1
        versionName "1.0"
        applicationId ""
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        debug {
            ndk {
                //这里要加上,否则debug包会出问题,后面三个为可选,x86建议加上不然部分模拟器回报错
                abiFilters "armeabi-v7a", "x86"
            }
        }
        release {
            ndk{
                abiFilters "armeabi-v7a"
            }
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
    }
}

你可能感兴趣的:(flutter)