调用需要API级别11(当前最小值为8):android.app.Activity#onCreateView
今天,我已经将android support v7 appcompat更新为23版。更新后,eclipse显示错误调用需要API级别11(当前最小值为8):android.app.Activity#onCreateView,android,android-activity,android-appcompat,Android,Android Activity,Android Appcompat,今天,我已经将android support v7 appcompat更新为23版。更新后,eclipse显示错误调用需要API级别11(当前最小值为8):文件头的android.app.Activity#onCreateView。这是我的java代码 package xxxxxx.xxxxxxx.xxxx.xx.activity; import xxxxxx.xxxxxxx.xxxx.xx.R; import android.os.Bundle; import android.support
调用需要API级别11(当前最小值为8):文件头的android.app.Activity#onCreateView
。这是我的java代码
package xxxxxx.xxxxxxx.xxxx.xx.activity;
import xxxxxx.xxxxxxx.xxxx.xx.R;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.LinearLayout;
import android.widget.TextView;
public class SingActivity extends AppCompatActivity {
private LinearLayout layInfo;
private TextView lblSongName;
private TextView lblStatus;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sing);
layInfo = (LinearLayout) findViewById(R.id.lay_info);
lblSongName = (TextView) findViewById(R.id.lbl_song_name);
lblStatus = (TextView) findViewById(R.id.lbl_status);
}
@Override
public void onBackPressed() {
finish();
}
}
如果您从
ActionBarActivity
扩展而不是AppCompatActivity
,该怎么办?ActionBarActivity
已被弃用检查如果您正在使用,java.lang.String,android.content.Context,android.util.AttributeSet)这是一个非常奇怪的问题。您的minSdk支持此级别。您是否正在使用api23进行编译?这是由Android SDK中的一个错误引起的-任何受影响的人都应该这样做。