我將一箇舊的Eclipse項目導入到Android Studio中,並且盡力讓它編譯,同時仍支持SdkVersion 4 。Android的 - 檢索項目的父項時出錯:未找到與給定名稱相匹配的資源'android:WindowTitleBackground'
的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.0.0'
defaultConfig {
applicationId "com.name.name"
minSdkVersion 4
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.0'
}
錯誤:
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
C:\Users\me\WORK\ORIGINAL\original_gradle_made\app\build\intermediates\res\merged\debug\values\values.xml
Error:(206) Error retrieving parent for item: No resource found that matches the given name 'android:WindowTitleBackground'.
Error:(206) Error retrieving parent for item: No resource found that matches the given name 'android:WindowTitleBackground'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
任何人都知道我失蹤或需要更改?
** minSdkVersion 4 **不確定是否存在它的2017年,您的目標受衆過多,至少達到14或15個//爲什麼您要使用min作爲4?如果看起來像我的框架錯誤@ _ @ –