美文网首页
Android编译libjpeg-turbo so

Android编译libjpeg-turbo so

作者: 愤怒的板蓝根 | 来源:发表于2018-09-22 13:29 被阅读0次

    首先 建立一个项目 吧那个C++啥的勾上 然后当前Moudlegradle配置

          apply plugin: 'com.android.application'
    
     android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.a15735.test"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags ""
                abiFilters 'arm64-v8a', 'armeabi-v7a'
            }
        }
         }
        buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
              //这里选你复制在jni 文件下的自带的CMakeLists.txt
            path "src/main/jni/CMakeLists.txt"
        }
    }
      }
    
    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    

    }

    1537593929(1).jpg
    复制所有下载号的源码
    https://github.com/libjpeg-turbo/libjpeg-turbo 下载地址
    然后就重新编译就行了 SO库在
    1537594056(1).jpg

    由于第一次弄这玩意 折腾了我一个上午 终于弄出来了 第一次弄这些东西

    相关文章

      网友评论

          本文标题:Android编译libjpeg-turbo so

          本文链接:https://www.haomeiwen.com/subject/pgtxoftx.html