【发布时间】:2017-04-01 03:34:06
【问题描述】:
我正在尝试使用 NDK 构建我的 android 项目,但是当我更改 build.gradle 文件时,android studio 显示错误并且我无法同步 gradle。你能帮我解决这个问题吗? 我的依赖
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.9.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
allprojects {
repositories {
jcenter()
}
task clean(type: Delete) {
delete rootProject.buildDir}
还有我的 build.gradle
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion 24
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.mycompany.myproject"
minSdkVersion.apiLevel 15
targetSdkVersion.apiLevel 24
versionCode 11
versionName "3.1"
multiDexEnabled true
}
buildTypes {
release {
debuggable true
minifyEnabled true
proguardFiles.add(file("proguard-rules.pro"))
signingConfig = $("android.signingConfigs.myConfig")
}
debug {
debuggable true
}
}
ndk {
moduleName = "name"
}
android.lintOptions {
disable 'MissingTranslation'
}
android.dexOptions {
javaMaxHeapSize "4g"
}
android.productFlavors {
manifestPlaceholders = [onesignal_app_id: "onesignalId",
local value is ignored.
onesignal_google_project_number: "projectnumber"]
}
}
android.signingConfigs {
create("myConfig") {
keyAlias 'alias'
keyPassword 'mypassword'
storeFile file('mypath')
storePassword 'mypassword'
storeType "jks"
}
}
感谢您的帮助!
【问题讨论】:
标签: java android android-studio android-ndk