home archives github knives links
tags android studio android
categories
only title title and content
Android Studio笔记

安装

官方文档
国内网站

Linux

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

手动设置:mirrors.neusoft.edu.cn:80

汉化

教程

汉化包

使用

windows

配置文件夹位置:C:/Users/lynx/.AndroidStudio3.5

增加虚拟设备:Tools->AVD Manager

android device monitor位置:E:\Android\Sdk\tools\monitor.bat

memory monitor 打开:Run->Profiler

解决网络问题:Configure->Setting->System Setting->HTTP Proxy->Auto-detect proxy settings

布局编辑器打开:打开一个xml文件->底部选择Design

Linux

清除缓存:Build->Clear Project

快捷键

常见错误

  1. Android resource linking failed

查看app的gradle有没有缺少implementation

  1. SDK tools directory is missing

TODO

  1. SDK does not contain any platforms

SDK的目录下要有名为platforms的文件夹

  1. Connection failed

TODO

  1. Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-x.x.x-all.zip'

  2. Gradle sync failed: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request" (973 ms)

直接下载解压相应文件到本地,修改gradle配置:Setting->Build, Execution, Deployment->Gradle

  1. Could not GET ...

不使用代理(No proxy),同时在gradle目录下编辑gradle.properties,删除所有代理