一、问题描述
在安卓项目中,构建(Build)失败并报错:xxxxx Integer Overflow(整型溢出)。
二、相关代码
刚开始以为是某个整数(例如控件、java类)不匹配造成的,检查如下代码:
Java类:
public class Video_Activity10 extends AppCompatActivity {
private MediaPlayer mPlayer = null;
private SurfaceView sfv_show;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_video10);
@SuppressLint({
"MissingInflatedId", "LocalSuppress"}) SurfaceView sfv_show = findViewById(R.id.surface);
SurfaceHolder surfaceHolder = sfv_show.getHolder();
@SuppressLint({
"MissingInflatedId", "LocalSuppress"}) Button btn_start = findViewById(R.id.btn1);