简体   繁体   中英

Master/Detail flow has minimum api level equal to that in use

When i try to create a new Master/Detail flow activity in Android Studio i am told "The activity Master/Detail Flow has a minimum SDK level of 11.". I understand why this is, but I don't understand why i am being prevented from creating this activity as the min SDK as defined by my AndroidManifest.xml is 11.

I created with a lower minimum but have since changed to 11. When i create a new project with a miniumum of 11, and then change the manifest to use 7 as min SDK I can create a new Master/Detail flow activity. This makes me think there is a project property i need to change, but I cannot find it!

I have tried so far:

  • downloading all SDKs from 11 upwards
  • Rebuilding project
  • Invalidating cache and restarting
  • setting Min, Target and Max SDK to 18
  • creating a new activity with "Power save mode" on

这是我的min SDK版本旁边的错误图片

This may be late answer but i found same problem.

Here is solution. On your build.gradle there will be following line

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 16
    }
}

just change minSdkVersion to 11 and click "Sync Project with Gradel File" icon, then try to create Activity again.

Problem occurred with minimum required sdk, I guess, you have API 18: Android 2.2 (Froyo) . Just change it to API 11 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM