AndroidStudio升级后,项目存在的问题

之前用的是AndroidStudio2.2.1之后升级到AndroidStudio3.0.1版本
遇到如下问题:
1,Declaring custom ‘clean’ task when using

Error:(48, 1) A problem occurred evaluating root project 'NEWAPP'.
> Declaring custom 'clean' task when using the standard Gradle lifecycle plugins is not allowed.

解决方法:
来自:http://blog.csdn.net/poorkick/article/details/72599929
把build.gradle中的clean task 无情地注释掉。

//task clean(type: Delete) {
//   delete rootProject.buildDir
//}

2,No service of type Factory

Error:No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices.

clean项目。出现问题3
3,Could not create plugin of type ‘AndroidMavenPlugin’.

Warning:The specified Android SDK Build Tools version (24.0.2) is ignored, as it is below the minimum supported version (26.0.2) for Android Gradle Plugin 3.0.1.
Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '24.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Information:BUILD FAILED in 2s
Error:FAILURE: Build failed with an exception.

* Where:
Script 'https://raw.githubusercontent.com/Commit451/gradle-android-javadocs/1.0.0/gradle-android-javadocs.gradle' line: 17

* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [id 'com.github.dcendents.android-maven']
   > Could not create plugin of type 'AndroidMavenPlugin'.
      > No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

解决办法:
来自:http://blog.csdn.net/suwenlai/article/details/55046644

dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath group: 'com.zeroc.gradle.ice-builder', name: 'slice', version: '1.3.14'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4'
    }

之前classpath ‘com.github.dcendents:android-maven-gradle-plugin:1.4’是1.3版本,换成1.4
4,换buildToolsVersion “26.0.2”

build.gradle里的buildToolsVersion在gradle3.0.1中对应的是26.0.2
buildToolsVersion "26.0.2"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值