Android 常见问题解决

1.Android 启动Activity后阻止EditText自动获取焦点

在EditText中添加如下属性即可

<LinearLayout
        android:focusable="true" 
        android:focusableInTouchMode="true"/>

2.在服务中更新通知栏进度条没效果

每次更新进度后都需要再调用一次 startForeground(),即:

notificationBuilder.setProgress(100,progress,false);
startForeground(1,notificationBuilder.build());

3.Invalid length for a Base-64 char array or string

上传base64图片出错

解决:修改服务端:

base64str = base64str.Trim().Replace(" ", "+");

4.Android Studio 3.* 编译错误

错误信息:

Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

解决方式:

buidl.gradle(Module:app)dependencies 节点中添加:

compile 'com.android.support:support-annotations:27.1.1'

转载于:https://www.cnblogs.com/-Tiger/p/7425239.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值