我目前正在尝试使用 Android L SDK版本创建一个 Android 应用 。 但是,当尝试使用Gradle生成项目时,我遇到以下错误:
"错误:发现项目样式/AppTheme超过一次"
哪个指向我的res/values-v21/styles.xml
我知道在 res/values/styles.xml 中已经定义了一个样式"AppTheme",但是我知道我在跟踪Android开发人员的指南。 也许有人可以帮助我:
这是我
build.gradleapply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion '20.0.0'
defaultConfig {
applicationId"com.mayuonline.ribbit"
minSdkVersion 'L'
targetSdkVersion 'L'
versionCode 1
versionName"1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:20.+'
}
AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?>
package="resume.kelseyhrubes">
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:name=".MainActivity"
android:label="@string/app_name">
值/样式。xml
@color/primary
@color/primary_dark
@color/primary_light
values-v21/styles 。xml<?xml version="1.0" encoding="utf-8"?>
@color/primary_dark
@color/primary_light
抱歉,格式错误,我希望一切都能读。 如果有人知道我在做什么,请告诉我。 我只是想制作一个sweet的应用。