开发中常见坑

来源:互联网 发布:php curl rest son 编辑:程序博客网 时间:2024/06/05 19:10

1.点击跳转到另一个页面时,为防止因为系统或网络响应慢而出现连续出现多个对象窗口,在点击一次之后 设置其clickble为false

2.在调用某个功能之前 先检查有没有权限 类似下面

PackageManager pkm = getPackageManager();
boolean has_permission = (PackageManager.PERMISSION_GRANTED == pkm.checkPermission("android.permission.RECORD_AUDIO", "packageName"));
if (has_permission) {
这里才开始真的干活的

}else {
showToast("没有权限");
}

删除androidstudio

Execute these commands from the terminal

rm -Rf /Applications/Android\ Studio.apprm -Rf ~/Library/Preferences/AndroidStudio*rm ~/Library/Preferences/com.google.android.studio.plistrm -Rf ~/Library/Application\ Support/AndroidStudio*rm -Rf ~/Library/Logs/AndroidStudio*rm -Rf ~/Library/Caches/AndroidStudio*

if you would like to delete all projects:

rm -Rf ~/AndroidStudioProjects

to remove gradle related files (caches & wrapper)

rm -Rf ~/.gradle

use the below command to delete all Android Virtual Devices(AVDs) and *.keystore. note: this folder is used by others Android IDE as well, so if you still using other IDE you may not want to delete this folder)

rm -Rf ~/.android

to delete Android SDK tools

rm -Rf ~/Library/Android*

0 0
原创粉丝点击