问题1:小米手机无法安装apk,报错手机已经安装需要卸载原始版本
解决:设置->更多设置->开发者选项->启动MIUI优化(关闭)
问题2:添加support jar包
解决:右键项目->open module setting->Dependencies->+(Library dependency)
问题3:Gradle相关的找不到或者不能从jcenter加载
解决:考虑在设置中Build,Execution,Deployment->Gradle选择use default gradle wrapper.offine work取消掉。
问题4:公司内有上网代理设置
解决:设置里面查询HTTP Proxy 手动设置一下
问题5:新建的module找不到r文件
解决:build项目之后查看错误,如果是找不到一些类,比如style.xml文件的问题,替换这个文件。
style.xml
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="AppThemeNoActionBar" parent="android:Theme.Holo.Light.NoActionBar"></style>
</resources>
解决:在module自己的gradle添加dependencies
compile 'com.android.support.constraint:constraint-layout:1.0.2'
一般preview里面会有错误提示,点击一下add这个类就自动生成以上。
问题7:更新Android Studio之后,原来的项目Gradle不兼容
解决:建议新建一个完整的application,根据里面正常运行的新的module修改原来项目的build.gradle文件
问题8:安装的插件都在哪里?
解决:用户文件夹(比如:C:\Users\sherry)\.AndroidStudio2.3\config\plugins