简体   繁体   中英

Call requires API level 11 (current min is 8): android.app.Activity#onCreateView FragmentActivity

I got this error: "Call requires API level 11 (current min is 8): android.app.Activity#onCreateView" whenever I'm extending my class with FragmentActivity.

Isn't FragmentActivity compatible with API 8? and if not, is there away to make it compatible?

Thanks in advance.

将要导入的类从常规库切换到支持库中的常规库,常规片段和fragementActivity仅适用于android 3.0(因此API 11),这就是导致您收到错误的原因。

Add

compile 'com.android.support:support-v4:23.0.0'

in build.gradle.

android.app.Activity#onCreateView is added on API 11.

You can set minSdkVersion to 11 or just don't use this method.

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