无法使用某些L SDK功能

Eli*_*vah 6 java android adt android-studio android-5.0-lollipop

我正在尝试在新SDK中使用新的Activity转换.

我试过这一行:

getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
Run Code Online (Sandbox Code Playgroud)

但问题是Window不包括在内FEATURE_CONTENT_TRANSITIONS.

我也尝试过这一行:

getWindow().setExitTransition(new Explode());
Run Code Online (Sandbox Code Playgroud)

并且Explode班级不存在......

我已经设置了我的项目用L SDK(android-L)编译并使用新的SDK工具(20.0.0)

的build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 'android-L'
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId 'com.tester'
        minSdkVersion 'L'
        targetSdkVersion 'L'
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile "com.android.support:support-v4:+"
}

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.+'
    }
}
Run Code Online (Sandbox Code Playgroud)

lig*_*303 0

似乎您没有在构建路径中包含 L SDK 库。这些库是否被列为您项目的依赖项?