安卓开发中常见的一些小问题

安卓开发中会遇到的一些问题
开发遇到的问题汇总
将一些遇到的问题及时的汇总到这里 便于以后查看。养成一个良好的习惯,可以是截图、文字、链接。写好日期及大致的原因。谨记,笃行。

2020.2.22
安卓intent打电话
https://blog.csdn.net/iteye_17881/article/details/82135854

Android studio连接模拟器 2.23
cmd无效
cd /dD:\Program Files\Nox\bin
需要加上 /d 不同分盘需要加上
nox_adb.exe connect 127.0.0.1:62001

kottlin部分语法
$a 代表输入a的值,
例如 var a = 1 val s = “a = $a” s的值是:a=1

var是变量
val是常量 类似于final修饰

for (a in 1…5)
println(a)
for循环相关
https://www.jianshu.com/p/27646c6561a7

3.2
Android studio
git 提交远程服务器
https://www.jianshu.com/p/3e6094c15a46
https://www.cnblogs.com/wurendao/p/11732876.html

加内存条
https://www.jb51.net/softjc/699028.html

3.3
约束性布局中的布局定出父布局
android:layout_height=“0dp”
app:layout_constraintBottom_toBottomOf=“parent”
同时设置这两项,就好了

3.6
dialog问题
今天开发遇到显示dialog,布局用的match_parent.显示在底部时只能显示wrap_content.
需要如下设置

Window dialogWindow = this.getWindow();
WindowManager.LayoutParams lp = dialogWindow.getAttributes();
Display display = dialogWindow.getWindowManager().getDefaultDisplay();
lp.width = (int)(display.getWidth()); //设置宽度

dialogWindow.setAttributes(lp);
dialogWindow.setGravity(Gravity.BOTTOM);

特别强调。需要在show()方法后调用。 才能正常显示。

3.6
安卓运算 math.
https://blog.csdn.net/qq_34947883/article/details/88977276

水波纹球
https://blog.csdn.net/wingichoy/article/details/50523713

3.21
高德地图 定位接入
注意定位权限
搜索地点
sha1值

3.23
https://www.sohu.com/a/258317066_500663
热修复
https://help.aliyun.com/document_detail/53240.html?spm=5176.doc53241.6.546.jWKccD

3.24
as 导入三方包错误
https://blog.csdn.net/qq_34224268/article/details/83861897

3.25
电脑配置dns代理地址
进入ipv4 属性 改成114.114.114.114

3.26
应用程序添加角标
ShortcutBadger

https://www.cnblogs.com/whycxb/p/10081963.html

3.27
oppo手机突然无法按照app
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_TEST_ONLY
Installation failed due to: ‘null’

在混淆文件 gradle.propertises 中添加

android.injected.testOnly=false
https://blog.csdn.net/y396397735/article/details/104222256

权限申请
https://www.jianshu.com/p/c83503f0384d

3.29
eventbus3.0 遇到的问题
在实际使用过程中,注册之后,会报找不到公共的注解方法,需要在注册的地方 实现一个公共注解方法

//必须定义一个方法 否则 EventBusException: Subscriber class *** and its super classes have no public methods with the @Subscribe annotation
@Subscribe(threadMode = ThreadMode.MAIN)
public void OnEventMainThread(EventBusTag messageEvent) {
}

3.30
kottlin
https://blog.csdn.net/github_33304260/article/details/80343514

日历
https://github.com/yannecer/NCalendar

flutter
https://flutterchina.club/get-started/install/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值