Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

项目里的example打包release模式,报错so #5

Open
zynzszyn521 opened this issue Oct 31, 2020 · 2 comments
Open

项目里的example打包release模式,报错so #5

zynzszyn521 opened this issue Oct 31, 2020 · 2 comments

Comments

@zynzszyn521
Copy link

大神,我用这个项目的example签名打包release后,报引用so的错误,搞了好久也没搞定
我用的V3.0的SDK,libs里边把arm64-v8a和armeabi-v7a两个文件都考进去了。
ndk也是配置的 abiFilters "armeabi-v7a","arm64-v8a"

debug模式正常,release闪退,查看log是so的错误,帮忙看下,万分感谢

@scofield-hello
Copy link
Owner

大神,我用这个项目的example签名打包release后,报引用so的错误,搞了好久也没搞定
我用的V3.0的SDK,libs里边把arm64-v8a和armeabi-v7a两个文件都考进去了。
ndk也是配置的 abiFilters "armeabi-v7a","arm64-v8a"

debug模式正常,release闪退,查看log是so的错误,帮忙看下,万分感谢

buildTypes {
release {
ndk { abiFilters "armeabi-v7a" }
signingConfig signingConfigs.release
}

    debug {
        ndk { abiFilters "armeabi-v7a" }
        signingConfig signingConfigs.debug
    }
}

@zynzszyn521
Copy link
Author

还是不可以,能帮忙加我微信18231630081或者QQ 498839683看看嘛。
我是Flutter\flutter_arcface_plugin-master\android\libs\目录下考入了官网SDK里边的两个so文件夹,
flutter_arcface_plugin-master\example\android\app里边的build文件内容如下,还是debug可以,relase出来的,装到手机上后,点击提取照片就闪退:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28

lintOptions {
    disable 'InvalidPackage'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.chuangdun.flutter_arcface_plugin_example"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    ndk {
        abiFilters "armeabi-v7a"
    }
}

// packagingOptions {
//     exclude "libs/armeabi-v7a/libarcsoft_face_engine.so"
// }

sourceSets {
    main {
        jniLibs.srcDirs = ['libs']
    }
}

signingConfigs {
    debug{
        keyAlias 'key'
        keyPassword '83217456'
        storeFile file('D:/key.jks')
        storePassword '83217456'
    }
    release {
        keyAlias 'key'
        keyPassword '83217456'
        storeFile file('D:/key.jks')
        storePassword '83217456'
    }
}

buildTypes {
    release {
        ndk { abiFilters "armeabi-v7a" }
        signingConfig signingConfigs.release
    }
    debug {
        ndk { abiFilters "armeabi-v7a" }
        signingConfig signingConfigs.debug
    }
}

}

flutter {
source '../..'
}

dependencies {
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants