Android
江江呀
愿心中有梦,手中有枪
展开
-
java.lang.NullPointerException: Missing required view with报错
一,报错信息如下E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.androidmqttclient, PID: 8997 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.androidmqttclient/com.example.androidmqttclient.Activity.DeviceControl原创 2021-03-31 16:25:21 · 4783 阅读 · 1 评论 -
Android EditText获取焦点在文字前面
EditText通过requestFocus()方法获取的焦点在文字之前解决方法EditText editText = (EditText)findViewById(R.id.edit);editText .setSelection(editText .getText().length());原创 2021-01-21 14:36:26 · 390 阅读 · 0 评论 -
java List.remove()删除对象失败
方法一、将remove(object)更改成使用迭代器或者下标删除列如: Iterator<对象> iterator = userList.iterator(); 除去自己 while (iterator.hasNext()) { User u = iterator.next(); if (getCurrentUser().getId().equ原创 2021-01-14 14:11:31 · 1391 阅读 · 0 评论 -
More than one file was found with OS independent
1、类似于这种问题2、解决方法在build.gradle文件中sourceSets下的main中jniLibs.srcDirs = [‘libs’]里面libs更改成功jniLibs如下所示: sourceSets { main { jniLibs.srcDirs = ['jniLibs'] } }...原创 2020-09-04 20:07:24 · 2248 阅读 · 0 评论