【Android错误(一)】

1、问题:This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run (or updating either the IDE or the Gradle plugin to the latest version)

解决方案:

2、问题:遇到包冲突的问题的时候,可以使用如下的办法,查看具体是哪个包下面出现的问题。

解决方案:

在Setting中搜索Compiler,在Command-line Options选项中填入--stacktrace,然后编译。

3、问题:出现App打红叉但是项目不报错的的情况,或者是其他的一些报错但是又没有找到问题的情况下。

解决方案:

多数这种情况,可以尝试clean project或者rebuild project或者终极清缓存的方案

4、问题:Gradle running编译慢的问题

解决方案:

在设置(setting)中找到Gradle选项,然后给Offline work打上勾即可!如果还是不行就在:

在C:\User\<用户名>\.gradle 目录下新建一个gradle.properties文件,并在里面添加一行:org.gradle.daemon=true

5、问题:Error:Could not create service of type FileCollectionSnapshotterRegistry using TaskExecutionServices.createFileCollectionSnapshotterRegistry().

解决方案:

出现这个错误多半是Gradle编译的问题,只要关闭项目,去项目文件中删除.gradle文件夹。然后打开运行就可以了。

6、问题:app transformNative libsWithStripDebugSymbolForRelease 

解决方案:

出现这个问题应该是so文件的引起的 gradle兼容性问题,将gradle的版本号降低就行了。如果是2.2.0的就降低到2.1.0就可以了

7、问题:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: Cannot merge new index 66857 into a non-jumbo instruction!

解决方案:

这个问题就代码函数过多的问题,直接在Build中加入multiDexEnabled true即可。

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值