zoukankan      html  css  js  c++  java
  • 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'
    
    文章部分内容摘自网络和图书,如有侵权,请联系我。
  • 相关阅读:
    面向对象程序设计作业1
    寒假作业4
    寒假作业3
    寒假作业2
    寒假学习计划
    三个生命中极可爱的人与难舍的往事
    Numpy and Pandas
    入门级神经网络之权重训练
    tensorboard入门
    1
  • 原文地址:https://www.cnblogs.com/-Tiger/p/7425239.html
Copyright © 2011-2022 走看看