Some features of the L SDK cannot be used.

I am trying to use new Activity transitions in a new SDK.

I tried this line:

getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); 

But the problem is that Window does not include FEATURE_CONTENT_TRANSITIONS .

I also tried this line:

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

And the Explode class does not exist ...

I have already established that my project must be compiled using the 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.+' } } 
+6
source share
2 answers

It looks like you are not including the L SDK library in your build path. Are libraries listed as dependencies on your project?

0
source

Try File -> Invalid Cache / Restart.

If this does not work, you can try to remove ~ / .AndroidStudioBeta (or ~ / .AndroidStudioPreview, depending on what you are using). It will clear all your settings, so be prepared for this, but this solved the problem in my case.

For Mac, it’s clear:
~ / Library / Application Support / AndroidStudioBeta
~ / Library / cache / AndroidStudioBeta
~ / Library / Logs / AndroidStudioBeta
~ / Library / Settings / AndroidStudioBeta p>

0
source

Source: https://habr.com/ru/post/971411/


All Articles