LYNX

Links

Tags

Categories

Android Studio笔记

安装

官方文档
国内网站

Linux

  • 运行程序:android-studio/bin/studio.sh

  • 64位机器需要安装32位库

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

快捷键

  • 向前/后跳转:alt+shift+left/right
  • 打开Logcat:alt+6
  • 重构:shift+f6
  • 运行:shift+f10

常见错误

  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,删除所有代理

Tags

Categories

1 / 1