大家好,我需要帮助实现adobe creative sdk。
注意:我的项目是基于NDK的项目(仅使用lame库)。
每当我尝试同步Gradle时,都会出现错误。
错误:没有这样的属性:类的manifestPlaceholders: com.android.build.gradle.managed.ProductFlavor
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.android.tools.build:gradle-experimental:0.8.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
/* 1) Add the Gradle Retrolambda Plugin */
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
}
}
allprojects {
repositories {
jcenter()
/* 2) Add mavenCentral */
mavenCentral()
/* 3) Add the Creative SDK Maven repo URL */
maven {
url 'https://repo.adobe.com/nexus/content/repositories/releases/'
}
maven {
url 'http://maven.localytics.com/public'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
---------------------------------基于模块APP ----------- -----------------------
apply plugin: 'com.android.model.application'
/* 1) Apply the Gradle Retrolambda Plugin */
apply plugin: 'me.tatarka.retrolambda'
model {
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig.with {
applicationId = "com.user.creativeimages"
vectorDrawables.useSupportLibrary = true
minSdkVersion.apiLevel = 16
targetSdkVersion.apiLevel = 25
versionCode = 1
versionName = "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles.add(file("proguard-rules.pro"))
}
}
}
/* 2) Compile for Java 1.8 or greater */
android.compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
/* 3) Exclude duplicate licenses */
android.packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
android.defaultConfig {
// ...
manifestPlaceholders = [appPackageName: "${applicationId}"]
}
android.dexOptions {
jumboMode true
}
/* 2) Compile for Java 1.8 or greater */
android.compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
/* 3) Exclude duplicate licenses */
android.packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
}
repositories {
flatDir {
dirs '../androidlame/build/outputs/aar'
}
}
repositories {
jcenter()
maven { url "https://dl.bintray.com/drummer-aidan/maven" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:support-compat:25.0.1'
compile 'com.android.support:design:25.0.0'
compile 'com.mcxiaoke.volley:library:1.0.17'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'me.zhanghai.android.materialprogressbar:library:1.1.7'
compile 'com.android.support:support-core-utils:25.0.1'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.google.android.gms:play-services-location:10.0.0'
compile 'com.google.android.gms:play-services-maps:10.0.0'
compile 'com.google.firebase:firebase-core:10.0.0'
compile 'com.google.firebase:firebase-messaging:10.0.0'
compile 'com.google.firebase:firebase-appindexing:10.0.0'
compile 'com.afollestad:material-camera:0.4.4'
compile 'id.zelory:compressor:1.0.4'
/* 4) Add the CSDK framework dependencies (Make sure these version numbers are correct) */
compile 'com.adobe.creativesdk.foundation:auth:0.9.1186'
compile 'com.adobe.creativesdk:image:4.8.3'
compile 'com.localytics.android:library:3.8.0'
compile project(':androidlame')
compile files('libs/okhttp-1.6.0.jar')
compile files('libs/org.apache.http.legacy.jar')
compile files('libs/common-lang3.jar')
}
apply plugin: 'com.google.gms.google-services'
答案 0 :(得分:0)
进入gradle-experimental不存在“getManifestPlaceholders”方法。你应该改成你的build.gradle行classpath 'com.android.tools.build:gradle-experimental:0.8.3'
和classpath 'com.android.tools.build:gradle:2.2.2'
换句话说,不要使用gradle-experimental版本,因为缺少该方法
你可以看到gradle surce class。 gradle