2016-11-17 103 views
1

我想的Adobe Creative SDK添加到Android應用程序,我按照這個(https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html)的教程,但是當我synic繼logcat的錯誤表演項目......找不到聲明元素「資源」

C:\Users\Muzamil Hussain\AndroidStudioProjects\SwitchApp\app\build\intermediates\res\merged\debug\values\values.xml 
Error:(2599, 44) No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light'). 
Error:(2599, 44) No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light'). 
Error:Execution failed for task ':app:processDebugResources'. 
> com.android.ide.common.process.ProcessException: Failed to execute aapt 

for value.xml文件。

我gradle這個app文件:

apply plugin: 'com.android.application' 
/* 1) Apply the Gradle Retrolambda Plugin */ 
apply plugin: 'me.tatarka.retrolambda' 


android { 
    compileSdkVersion 24 
    buildToolsVersion '24.0.3' 

    defaultConfig { 
     applicationId "com.example.muzamil_hussain.switchapp" 
     minSdkVersion 16 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     manifestPlaceholders = [appPackageName: "dfc,,,,myapi key........mmmm"] 
    } 
    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE-FIREBASE.txt' 
     exclude 'META-INF/NOTICE' 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

    /* 2) Compile for Java 1.8 or greater */ 
    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_8 
     targetCompatibility JavaVersion.VERSION_1_8 
    } 

    /* 3) Exclude duplicate licenses */ 
    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' 
    } 

    // This is handled for you by the 2.0+ Gradle Plugin 
    aaptOptions { 
     additionalParameters "--no-version-vectors" 
    } 
} 

repositories { 
    mavenCentral() 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:24.0.3' 
    testCompile 'junit:junit:4.12' 
    compile 'com.google.firebase:firebase-database:9.8.0' 
    compile 'com.google.firebase:firebase-core:9.8.0' 
    compile 'com.google.firebase:firebase-auth:9.8.0' 
    compile 'com.google.firebase:firebase-storage:9.8.0' 
    compile 'com.google.firebase:firebase-crash:9.8.0' 
    compile 'com.google.firebase:firebase-messaging:9.8.0' 
    compile 'com.facebook.android:facebook-android-sdk:[4,5]' 
    compile 'com.google.android.gms:play-services-appindexing:9.8.0' 
    compile 'com.firebase:firebase-client-android:2.5.2' 
    compile 'com.firebaseui:firebase-ui:0.6.2' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.squareup.okhttp:okhttp:2.4.0' 
    compile 'com.pkmmte.view:circularimageview:1.1' 
    compile 'com.github.QuadFlask:colorpicker:0.0.12' 
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.4' 
    compile 'com.adobe.creativesdk.foundation:auth:0.9.1186' 
    compile 'com.adobe.creativesdk:image:4.6.3' 
    compile 'com.localytics.android:library:3.8.0' 

} 

apply plugin: 'com.google.gms.google-services' 

這的build.gradle(項目:名稱)

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 

    } 

    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.2' 
     classpath 'com.google.gms:google-services:3.0.0' 

     /* 1) Add the Gradle Retrolambda Plugin */ 
     classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
     maven { url "https://jitpack.io" } 

     /* 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 
} 
+0

你有沒有改變你的appcompat庫等。這個問題可能是由於資源在一個版本的sdk中,而沒有在其他版本中。 – Bali

+0

我設置了appcompat庫24.0.3 –

+0

compileTree(dir:'libs',include:['* .jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2' testcompile'junit:junit:4.12',{ exclude group:'com.android.support',module:'support-annotations' }) compile'c​​om.android.support:appcompat-v7:24.0.3' testCompile'junit:junit:4.12' –

回答

0

啓用Android的支持。

轉到文件>設置>插件,然後啓用它。