1. Android Studio报:Connection timed out: connect. If you are behind an HTTP proxy错误:
2. 报错:Plugin [id: ‘com.android.application’, version: ‘7.3.0’, apply: false] was not found in any of the following sources:
3. Warning: Failed to parse host xx.xx.com
我遇到的是:warning: failed to parse host https://mirrors.aliyun.com/android.googlesource.com/
- https://blog.csdn.net/weixin_38515203/article/details/106453256
这步我的版本是2023年的,路径是:C:\Users\19060.gradle\gradle.properties
4. 配置代理Proxy:
5. 重置Android Studio
直接重装没法重置。。。。。
- https://blog.csdn.net/CaliXz/article/details/80704615
- https://blog.csdn.net/qq_41945296/article/details/110240308
6. 连接手机调试
似乎手机名称不能有中文
7. 在xubuntu里报模拟器不能用,因为权限问题:
“/dev/kvm device: permission denied”
- 查看
/dev/kvm
ls -al /dev/kvm
可见它是一个文件(c
表示字符设备文件),归属用户为root
,而我登录用户为ubuser
- 更改归属用户
然后再运行能可以了。
8. 在xml里修改按钮的背景颜色,但是设计器里的颜色并没有变,运行后才变
这是由于按钮的背景色被默认使用主题颜色,目前我知道的方法是:
将<Button>改为<android.widget.Button>
也有说修改主题配置的,新建项目的主题是Theme.Material3.DayNight.NoActionBar
,这个的按钮默认是紫色的,运行后也是紫色的,换成其他主题后,运行才能是所设置的颜色。但是按这种方法修改后,在设计时,设计器的按钮颜色并没有变。