AndroidStudio常见问题

一.Error:null value in entry: destinationDir=null

删掉根目录下的.gradle文件夹 然后重启as.

二.AS使用svg图标

右击drawable -->new->Vector asset-->选择路径了 取好名字就行

.Error:(134, 0) Gradle DSL method not found: 'compile()'

Error:(134, 0) Gradle DSL method not found: 'compile()'

Possible causes:<ul><li>The project 'Anzer4' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).

<a href="fixGradleElements">Upgrade plugin to version 2.3.3 and sync project</a></li><li>The project 'Anzer4' may be using a version of Gradle that does not contain the method.

<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.

<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>

出现这种情况,就看看app/build.gradle文件里  是不是有两个compile语句在同一行的情况。

.如果一个应用as安装没问题,但是单独安装apk就会闪退。

这个时候可以把instance run选项先去掉试下。






猜你喜欢

转载自blog.csdn.net/hnlgzb/article/details/80913229