새로운 프로젝트 마법사를 통해 자료 및 Android L SDK를 실험하고 있습니다. 내 에뮬레이터를 내 실제 장치가 SDK 19를 실행하는 sdk L로 설정했습니다. 별도의 "productFlavors"와 "L"에 대한 "현대", 19에 대한 "old"및 마지막으로 "old"하나를 사용하여 시도했습니다. 기기에서 실행되었지만 작동하지 않았습니다. 마침내 내 build.gradle에서 SDK "L"의 모든 흔적을 제거하고 AndroidManifest.xml에서 최소/대상 버전을 19로 설정하기까지 했었지만 실행하려고 할 때 장치 선택기가 여전히 "L"은 minSDK입니다. 가 있다면Android Studio에서 minSdkVersion을 설정하지 않습니다.
나는를 싱크 내 Gradle을 파일을 구축 resync'ed 한, 나는 이전에 실행 설정을 실행에 깨끗한 실행했습니다, 난 볼 수있는 속성 파일을 통해 검토 한 결과 내가 놓친 목표 세트. 단순히 "L"SDK를 사용하면 minimunTarget이 "L"로 고정되어 올바른 것으로 믿지 않습니다. 내가 어디로 잘못 가고 있니? 여기
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion '20.0.0'
defaultConfig {
applicationId 'com.craig.mymaterial'
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName '1.0'
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
modern {
// minSdkVersion 'L'
// targetSdkVersion 'L'
}
old {
minSdkVersion 19
targetSdkVersion 19
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// You must install or update the Support Repository through the SDK manager to use this dependency.
compile 'com.android.support:support-v4:19.+'
}
내 AndroidManifest.xml에 다음과 같습니다 : 여기
내 build.gradle의
이
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.craig.mymaterial" >
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".ItemListActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ItemDetailActivity"
android:label="@string/title_item_detail"
android:parentActivityName=".ItemListActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ItemListActivity" />
</activity>
</application>
</manifest>
예, 방금 상황을 설명하고 해결 방법을 찾은 답을 찾았습니다. http://www.reddit.com/r/androiddev/comments/ 297xli/howto_use_the_v21_support_libs_on_older_versions / – Cliff