Android 如何在基于NDK的项目中使用adobe creative sdk

Android 如何在基于NDK的项目中使用adobe creative sdk,android,android-ndk,adobecreativesdk,Android,Android Ndk,Adobecreativesdk,大家好,我需要adobe creative sdk实施方面的帮助 注意:我的项目是基于NDK的项目(仅使用lame库) 每当我尝试同步Gradle时,就会出现错误 错误:没有此类属性:类的占位符: com.android.build.gradle.managed.ProductFlavor ---------------------------------基于应用程序的模块---------------------------------- apply plugin: 'com.android.

大家好,我需要adobe creative sdk实施方面的帮助

注意:我的项目是基于NDK的项目(仅使用lame库)

每当我尝试同步Gradle时,就会出现错误

错误:没有此类属性:类的占位符: com.android.build.gradle.managed.ProductFlavor

---------------------------------基于应用程序的模块----------------------------------

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'

进入gradle实验是不存在“getManifestPlaceholders”方法的。您应该将行
classpath'com.android.tools.build:gradle-experimental:0.8.3'
classpath'com.android.tools.build:gradle:2.2'
换句话说,不要使用gradle实验版本,因为缺少该方法
你可以看到格雷德·瑟斯的课

可能重复。可能重复…………是的,问题不在于adobe创造性,而在于“gradle实验性”,你可以在上面的链接中找到更多信息。如果你有任何想法,请在此提供。我无法替换它,因为'classpath'com.android.tools.build:gradle-experimental:0.8.3'用于ndk如果我更改,则ndk支持将不起作用。你有没有其他选择而不替换它?@vikasdube所以你需要0.8.3版本?@vikasdube试试这个“com.android.tools.build:gradle:0.8.3”不,你不会出错,我不需要“com.android.tools.build:gradle:0.8.3”这是老版本。我需要gradle实验:0.8.3,因为它用于ndk支持,而普通gradle不支持它
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'