NDK kullanan bir modül ile proje oluşturmaya çalışıyorum. Ancak Gradle yapısı hata veriyor.Gradle deneysel eklenti kullanarak NDK modülü nasıl oluşturulur?
bu benim build.gradle (Ana projesi)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// classpath 'com.android.tools.build:gradle-experimental:0.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Bu gradle kullanmayı deneyin: com: Bu hatası '(17, 0) kimlikli Plugin Hatası' verir 1.5.0. android.model.application 'bulunamadı.'
Öte yandan, grad-deneysel kullanırsanız: 0.1.0 hata veriyor ' Hata: (17, 0)' com.android.application 'id eki' bulunamadı. '
Bu hatayı nasıl çözebilirim? Projemde birkaç modül var. Tüm modülleri tatmin ederek nasıl ayar yapabilirim?
düzenlendi:
build.gradle (Ana projesi)
buildscript {
repositories {
jcenter()
}
dependencies {
// classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.android.tools.build:gradle-experimental:0.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
def isReleaseBuild() {
return isTag() && !isSnapshot()
}
def isSnapshot() {
return version.contains("SNAPSHOT")
}
boolean isTravis() {
return System.getenv('TRAVIS_BUILD_NUMBER') ? true : false
}
boolean isTag() {
def tag = System.getenv('TRAVIS_TAG')
return !(tag == null || tag.isEmpty())
}
def buildNumber() {
return System.getenv('TRAVIS_BUILD_NUMBER') ?: "0"
}
build.gradle (uygulama)
apply plugin: 'com.android.model.application'
repositories {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://oss.sonatype.org/content/repositories/releases"
}
maven {
url "https://oss.sonatype.org/content/repositories/staging"
}
}
model {
android {
compileSdkVersion = 22
buildToolsVersion = "22.0.1"
defaultConfig.with {
applicationId = "com.ToxicBakery.viewpager.transforms"
minSdkVersion.apiLevel = 16
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
android.lintOptions {
checkReleaseBuilds = false
}
}
dependencies {
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'info.hoang8f:fbutton:1.0.5'
compile project(':contextMenu')
compile project(':library')
compile project(':library2')
compile project(':titanic')
compile files('libs/universal-image-loader-1.9.4.jar')
compile project(':staggeredview')
compile project(':min3d')
}
build.gradle (contextmenu)
apply plugin: 'com.android.model.library'
model {
android {
compileSdkVersion = 21
buildToolsVersion = "21.1.2"
defaultConfig.with {
minSdkVersion.apiLevel = 11
targetSdkVersion.apiLevel = 21
}
}
android.lintOptions {
checkReleaseBuilds = false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.nineoldandroids:library:2.4.0'
}
build.gradle (kitaplık)
apply plugin: 'com.android.model.library'
apply plugin: 'signing'
model {
android {
compileSdkVersion = 22
buildToolsVersion = "22.0.1"
defaultConfig.with {
minSdkVersion.apiLevel = 13
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
android.lintOptions {
checkReleaseBuilds = false
}
}
dependencies {
compile 'com.android.support:support-v13:22.1.1'
}
apply from: '../maven_push.gradle'
build.gradle (library2)
apply plugin: 'com.android.model.library'
model {
android {
compileSdkVersion = 22
buildToolsVersion = "22.0.1"
defaultConfig.with {
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
android.lintOptions {
checkReleaseBuilds = false
}
}
dependencies {
}
build.gradle (min3d)
apply plugin: 'com.android.model.library'
model {
android {
compileSdkVersion = 15
buildToolsVersion = "21.0.2"
defaultConfig.with {
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
debug {
}
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
android.productFlavors {
}
android.lintOptions {
checkReleaseBuilds = false
}
}
dependencies {
compile 'com.android.support:appcompat-v7:20.0.0'
compile fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}
build.gradle (staggerdview)
apply plugin: 'com.android.model.library'
dependencies {
compile 'com.android.support:support-v4:19.1.+'
}
model {
android {
compileSdkVersion = 22
buildToolsVersion = "22.0.1"
defaultConfig.with {
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
android.lintOptions {
checkReleaseBuilds = false
}
}
build.gradle (titanic)
apply plugin: 'com.android.model.library'
model {
android {
compileSdkVersion = 22
buildToolsVersion = '22.0.1'
defaultConfig.with {
minSdkVersion.apiLevel = 11
targetSdkVersion.apiLevel = 19
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes{
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
android.lintOptions {
checkReleaseBuilds = false
}
}
dependencies {
compile 'com.android.support:appcompat-v7:20.+'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Ben modül gibi tüm modülün gradle {...} değiştirmek gerekiyor? – shj
Sanırım evet çünkü 'com.android.tools.build: gradle-experimental: 0.4.0' gradle plugin kullanıyorsunuz ve '' com.android.model.application '' sadece destekleyecektir. –
Tüm modülleri 'com.android.library' yerine 'com.android.model.library' olarak değiştiriyorum. ama aniden diğer hata veriyor - "Hata: 'görev' android 'özelliği bulunamadı: kütüphane: androidJavadocs'." Bu hatanın ne anlama geldiğini bana yardım edebilir misin? – shj