本文介绍了不能使用一些的L- SDK功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用新的活动转变,在新的SDK。

我想这行:

  getWindow()requestFeature(Window.FEATURE_CONTENT_TRANSITIONS)。
 

但问题是,窗口不包括 FEATURE_CONTENT_TRANSITIONS

我也试过这一行:

  getWindow()setExitTransition(新爆炸());
 

炸开类不存在...

我已经把我的项目中以L SDK(Android为L)的编译和使用新的SDK工具(20.0.0)

build.gradle:

 应用插件:com.android.application

安卓{
    compileSdkVersion机器人-L'
    buildToolsVersion '20 .0.0
    defaultConfig {
        的applicationIDcom.tester
        的minSdkVersion'L'
        targetSdkVersion'L'
        版本code 1
        VERSIONNAME'1.0'
    }
    buildTypes {
        推出 {
            runProguard假
            proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro
        }
    }
    productFlavors {
    }
}

依赖{
    编译文件树(导演:库,包括:['的* .jar'])
    编译com.android.support:support-v4:+
}

buildscript {
    库{
        mavenCentral()
    }

    依赖{
        类路径com.android.tools.build:gradle:0.12.+
    }
}
 

解决方案

试着文件 - >的Invalidate缓存/重新启动。

如果不工作,你可以尝试删除〜/ .AndroidStudioBeta(或〜/ .AndroidStudio preVIEW,无论你正在使用)。这将清除所有的设置,所以要ppared为$ P $,但对我来说这解决了这个问题。

对于Mac,明确表示:
〜/库/ Application Support / AndroidStudioBeta
〜/图书馆/缓存/ AndroidStudioBeta
〜/资源库/日志/ AndroidStudioBeta
〜/库/ preferences / AndroidStudioBeta

I'm trying to use the new Activity transitions in the new SDK.

I tried this line:

getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);

But the problem is that Window doesn't include FEATURE_CONTENT_TRANSITIONS.

I also tried this line:

getWindow().setExitTransition(new Explode());

And Explode class doesn't exist...

I already set my project to be compiled with L SDK (android-L) and use the new SDK tools (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.+'
    }
}
解决方案

Try File -> Invalidate Caches / Restart.

If that doesn't work, you can try deleting ~/.AndroidStudioBeta (or ~/.AndroidStudioPreview, whichever you are using). It will clear all your settings so be prepared for that, but this solved the issue in my case.

For Mac, clear:
~/Library/Application Support/AndroidStudioBeta
~/Library/Caches/AndroidStudioBeta
~/Library/Logs/AndroidStudioBeta
~/Library/Preferences/AndroidStudioBeta

这篇关于不能使用一些的L- SDK功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 22:26