zoukankan      html  css  js  c++  java
  • android 错误解决


    转自:https://blog.csdn.net/gbstyle/article/details/82926358 

    错误1:

    com.android.ddmlib.AdbCommandRejectedException: device unauthorized.
    This adb server's $ADB_VENDOR_KEYS is not set
    Try 'adb kill-server' if that seems wrong.
    Otherwise check for a confirmation dialog on your device.
    Error while Installing APK

    解决方案:

    手机-设置-应用程序-开发-usb调试打开再关闭一次

    错误2:

    关于FrameLayout的介绍是:FrameLayout内的子View会被绘制在一个栈中,最后添加的组件会被添加在最上面。按照这样的说法,应该是ImageView会覆盖在Button上面的。但是实际的效果却是这个样子的:

    按钮显示在了FrameLayout的顶部。

    原因分析:

    按钮在Lollipop以及之后的版本,默认都有一个高度,这个也就是造成为什么在FrameLayout中绘制的时候会被绘制在最上层。

    解决方法一:

    设置Button的stateListAnimator属性

    android:stateListAnimator="@null"

    不过这样做的话,按钮的阴影效果也会不见

    解决方法二:

    设置其他View的elevation属性

    <ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@mipmap/ic_launcher"
    android:elevation="2dp"

    错误3:

    转自https://blog.csdn.net/crheh/article/details/78358004

    android studio 运行出现“The activity must be exported or contain an intent-filter

    在studio界面的run下面有一个框

    这里写图片描述

    在里面选app文件夹 
    这里写图片描述 
    之后再运行就好了

  • 相关阅读:
    SD_WebImage-03-多线程+下载任务放入非主线程执行
    NSOperationQueue_管理NSOperation-02-多线程
    CALayer小结-基本使用00-UI进阶
    XMPP-UI进阶-01
    XMPP总结-UI进阶-00
    UI控件总结-UI初级
    转场动画-01-day4
    暂停-开始动画-核心动画-08-day4
    核心动画-04-CALayer隐式动画
    Android开发技术周报 Issue#71
  • 原文地址:https://www.cnblogs.com/xuqp/p/11057379.html
Copyright © 2011-2022 走看看