这是代码中的一部分:
EditText user,password;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
user = (EditText) findViewById(R.id.user);
password = (EditText) findViewById(R.id.pass);
Button btn = (Button) findViewById(R.id.btnLogin);
}
public void login(View v){
if(JavaLike.getString(user).equals("admin")&&JavaLike.getString(password).equals("admin")){
Toast.makeText(MainActivity.this,"OK"+JavaLike.getString(user),Toast.LENGTH_LONG);
}
else{
Toast.makeText(MainActivity.this,"not OK"+JavaLike.getString(user),Toast.LENGTH_LONG);
}
}
}
getSlotFromBufferLocked:未知缓冲区:0xaa972750 08-27 20:24:40.280 9008-9055 / com.example.pc.myapplication E / Surface: getSlotFromBufferLocked:未知缓冲区:0xaa96fd50 08-27 20:24:42.198 9008-9055 / com.example.pc.myapplication E / Surface: getSlotFromBufferLocked:未知缓冲区:0xaa970a00 08-27 20:26:32.703 9008-9055 / com.example.pc.myapplication E / Surface: getSlotFromBufferLocked:未知缓冲区:0xaa96fd50 08-27 20:26:34.670 9008-9055 / com.example.pc.myapplication E / Surface: getSlotFromBufferLocked:未知缓冲区:0xaa96fd50
答案 0 :(得分:7)
这是一个错误,并已在Android 6.0.1中修复,这是一个更多信息的链接 E/Surface﹕ getSlotFromBufferLocked: unknown buffer: 0xab7519c0
答案 1 :(得分:0)
在清单中的应用程序标签中添加android:usesCleartextTraffic="true"
行。