How to configure NDK project in Android Studio 1.3

前端 未结 3 910
有刺的猬
有刺的猬 2021-02-20 03:08

I have been trying to configure Android Studio for NDk by following this article and this article. The following are the contents of my gradle-wrapper.properties



        
3条回答
  •  萌比男神i
    2021-02-20 04:00

    In your build.gradle(module), the android.buildTypes block needs to outside of the android block. So it should look like this:

    model {
        android {
            compileSdkVersion = 22
            buildToolsVersion = "23.0.0 rc3"
    
            defaultConfig.with {
                applicationId = "com.opaxlabs.nativetest"
                minSdkVersion.apiLevel =  15
                targetSdkVersion.apiLevel =  22
                versionCode = 1
                versionName = "1.0"
            }
        }
        android.buildTypes {
            release {
                minifyEnabled = false
                proguardFiles += file('proguard-rules.pro')
            }
        }
        android.ndk{
            moduleName = "native"
        }
    }
    

提交回复
热议问题