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文件夹 
这里写图片描述 
之后再运行就好了

 

posted @ 2019-06-20 10:50  FeelRose  阅读(497)  评论(0编辑  收藏  举报