Android studio 遇见问题记录

1. 找不到 Subversion 的解决方法

原因:android studio用户目录下的配置设置subversion插件不能使用
解决方案:C:\Users\Administrator.AndroidStudio1.2\config下发现了个文件:disabled_plugins.txt,这是禁用的插件,打开后,把 Subversion删除,保存,再次打开 android studio, 问题得解。

2. android 相关的东西加载不出来

这里写图片描述
解决思路:没有加载Android相关的插件,点击系统设置,找到 Plugins,然后把 Android Support 勾选上,点击应用或者 OK 就可以了。
这里写图片描述

3. protocol fault (couldn’t read status):connection reset by peer

这里写图片描述
原因:端口被占用
解决方案:找出占用该进程的端口,在任务管理器中关闭该进程,重新启动 adb 即可。
step1:使用命令:netstat -aon|findstr “5037” 找到占用5037端口的进程PID。
这里写图片描述
step2:使用命令:tasklist|findstr “13289” 通过PID找出进程。
这里写图片描述
step3: 调出任务管理器,找到这个进程,结束进程。
这里写图片描述
step4: 使用命令:adb start-server 启动adb就行了。
这里写图片描述

4. android studio – Android App – no module

goto Android >> Gradle Scripts>>Build Gradle(Module :app)

make sure the first line of this file is like this.

apply plugin: 'com.android.application'
not like this

apply plugin: 'com.android.library'

5. 解决"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"错误

安装了Android Studio 3.2,打开一个旧工程,编译提示"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android",原因如下:

NDK的更新记录里有一段话:
This version of the NDK is incompatible with the Android Gradle plugin
   version 3.0 or older. If you see an error like
   `No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`,
   update your project file to [use plugin version 3.1 or newer]. You will also
   need to upgrade to Android Studio 3.1 or newer.

也就是说新版本的NDK与3.0及以前旧版的Android Gradle plugin插件不兼容

其实解决方法很简单,就是修改build.gradle中的红字部分,改为3.1以上版本即可

dependencies {
    classpath 'com.android.tools.build:gradle:3.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值