Android开发(1)Android Studio平台问题综合
本学期的软件工程课设小组决定做一个安卓平台的触控笔记软件开发。所采用的的IDE为Android Studio,选用语言为java和kotlin。本篇博客为长期更新型博客,会有时间戳进行记录不同事件遇到的IDE问题。
2020/10/4日志 添加AS平台运行程序问题1,2
- AS平台运行程序问题 1、设备问题 由于设备的限制——没有测试机,只能够使用AS平台自带的AVD用于虚拟运行。就2020/10/4的使用情况来看,虚拟机的内存占用回事一个比较大的问题。目前选用的AVD设备为 Pixel_3a_API_30。
需要注意的是,本开发机为intel处理系统,若为AMD的芯片,需要额外安装虚拟机和模拟器然后导入
2、Gradle安装 新项目建立的时候,若卡住则重装,在正确生成文件之后,由于项目的Gradle默认下载地址是google的外网,因此需要在build.gradle中添加国内镜像。(修改如下)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.3.72"
repositories {
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url "https://jitpack.io" }
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
之后sync on即可,需要等待一段时间。