![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android
losedguest
这个作者很懒,什么都没留下…
展开
-
初次安装Android Studio下载SDK等必定失败
到android studio安装目录,打开bin目录,编辑idea.properties, 在文件末尾添加:disable.android.first.run=true这将禁用第一次运行2.再次打开android studio将进入欢迎页面,点击Config…, 搜索HTTP,即可设置HTTP代理3.删掉Step 1 中所加的那一行,再次启动android studio,就可以使用你的HTTP代转载 2017-12-02 21:29:16 · 4576 阅读 · 1 评论 -
java模拟C# Action作为方法参数传递
1.定义Action的接口public class pubInterface { public static interface action<T>{ void invoke(T o); }}2.调用的地方使用方式 pubdialog.ShowAskMsg(this,"你是我的提示信息",new pubInterface.act...原创 2019-05-03 20:00:44 · 1480 阅读 · 0 评论 -
android模拟测试正常,打包成apk后真机测试闪退
模拟测试正常,打包成apk后真机测试闪退用真机测试 报错Could not find method invest_check(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.widget.LinearLayoutinvest_check...原创 2019-04-18 23:33:23 · 1334 阅读 · 0 评论 -
genymotion启动不了了,the virtual device got no ip address
之前运行正常,突然某天出现异常问题thevirtualdevicegotnoipaddress,The VirtualBox DHCP server has not assigned an IP address to the virtual device检查了virtual box设置等都觉得正常,virtualbox先运行后,在运行genymotion时可以启动,ge...原创 2019-05-01 22:58:01 · 1234 阅读 · 0 评论 -
Android Studio Layout:cannot find the declaration of element 'LinearLayout'
在layout文件夹下建立子文件后(),子文件夹里xml文件出现Layout:cannot find the declaration of element 'LinearLayout'解决方案:需要在build.gradle里增加sourceSets节点将添加布局引用注意子文件夹命名layout-XXX格式,其他格式可能依然报错参考https://blog.csdn.net/qq...原创 2019-04-21 22:34:41 · 2251 阅读 · 0 评论 -
Error running 'app': No target device found.
使用genymotion调试时,测试机已开启运行时出现异常Error running 'app': No target device found.解决方案,看下调试设备是否选择正确 ,可以将usb device选择open select项目录 run->edit configurations参考https://blog.csdn.net/aaa1050070637/art...原创 2019-04-21 21:00:08 · 5301 阅读 · 0 评论 -
android 使用手机调试问题 荣耀9青春版USB无法授权
异常1.com.android.ddmlib.AdbCommandRejectedException: device unauthorized.This adb server's $ADB_VENDOR_KEYS is not setTry 'adb kill-server' if that seems wrong.使用手机调试是碰到上面的问题解决方案:插了数据线,开启USB调试...原创 2019-04-16 20:33:36 · 1061 阅读 · 0 评论 -
Failed to find Build Tools revision 28.0.2 Install Build Tools 28.0.2
參考:https://blog.csdn.net/hjz_life/article/details/82947207新裝的Android Studio后新建項目,出現異常Failed to find Build Tools revision 28.0.2 Install Build Tools 28.0.2解決方案如下在App->build.gradle文件里增加一行代碼bui...原创 2019-04-10 08:49:30 · 2053 阅读 · 0 评论 -
andriod自定义控件找不到java.lang.ClassNotFoundException: Didn't find class "***" on path
java.lang.ClassNotFoundException: Didn't find class "***" on path自定义控件时,找不到mycontrols里的控件,因为app里的build_gradle里没有引用自定义项目implementation 的详情,参考https://www.jianshu.com/p/f34c179bc9d0...原创 2019-04-05 22:08:26 · 918 阅读 · 0 评论 -
android异常Call requires API level 16 (current min is 15): android.view.View#setBackground
参考https://blog.csdn.net/bigtree_mfc/article/details/70843698Call requires API level 16 (current min is 15): android.view.View#setBackground意思是build.gradle中的minSdkVersion就可以了如下图将 15改成16后 页面顶部有...原创 2019-04-05 15:55:29 · 568 阅读 · 0 评论 -
Android Studio 关于R文件“cannot resolve symbol”异常的解决方案
参考https://blog.csdn.net/ygz111111/article/details/79652627方案1:R文件出现问题的可能是你的manifest标签的package标签有问题,也就是不是定位到项目的activity所在的包下面;方案2:可能就是你的AndroidManifest里面有错,或者某一个子标签写错或者哪里多了少了一点属性或者多余的字段等等,因为这是app最重...原创 2019-04-05 15:48:52 · 507 阅读 · 0 评论 -
android 开发异常 URI is not registered ( Setting | Project Settings | Schemas and DTDs )
问题描述: URI is not registered ( Setting | Project Settings | Schemas and DTDs )解决:file->settings 如下图参考https://www.cnblogs.com/ttflove/p/6341469.html原创 2019-04-04 21:31:47 · 202 阅读 · 0 评论 -
AndroidStudio中安装插件重启后未出现Genymotion后没有显示图标
将菜单View->ToolBar未打开时显示 打开后显示设置Genymotion的安装位置file->setting->genymotion设置路径原创 2018-10-03 23:48:43 · 7720 阅读 · 5 评论 -
Android 学习日志
1.Layout_weight的理解Layout_weight剩余空间的匹配权重,控件设置宽度不超过屏幕空间剩余空间为正值,控件设置宽度超过屏幕宽度剩余空间为负值控件实际宽度=控件设置宽度+剩余空间的权重值剩余空间的权重值=剩余空间*权重比率ClientX=100; 屏幕空间,可以是高或者宽AX=10,AWeight=1; 控件设置空间,权重BX=20,BWeight=2;...原创 2019-06-01 10:08:24 · 91 阅读 · 0 评论