1.Error:Could not get unknown property 'apkVariantData' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.

答:这个是因为Tinker中用到了apkVariantData属性,我们可以将tiner的gradle去除掉。上面是发现tinker有问题,另外发现GrowingIO也有这个问题,如果用的是gradle plugin3.0.0的话也需要去掉,如果还有童鞋有补充的,欢迎留言。

2.如果你的项目用到了,类似releaseCompile或者debugCompile的情况,根据配置来进行编译,会报如下的错误

Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :library.
Error:Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :library.复制代码

可以用下面的语句来进行替换

dependencies {implementation project(':library')// You can, however, keep using variant-specific configurations when// targeting external dependencies. The following line adds 'app-magic'// as a dependency to only the "debug" version of your module.debugImplementation 'com.example.android:app-magic:12.3'
}复制代码

3.Could not resolve com.android.support:multidex:1.0.2."

答:在项目录根目录下面的build.gradle文件增加:

    buildscript {repositories {......if (GRADLE_PLUGIN_VERSION_NEWER == "true")google()}}allprojects {repositories {maven {url 'https://maven.google.com'}}}复制代码

4.找不到outputFile属性

Error:(37, 1) A problem occurred configuring project ':app'.
> Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=release, filters=[]}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.复制代码

答:each改成all,而且那个fileName就是文件名,不需要路径,因为在3.0的gradle插件,output.OutputFile是只读属性,所以修改apk打包的文件名,需要用outputFileName.

5.目前我的方案是在gradle.properties中增加GRADLE_PLUGIN_VERSION_NEWER=true的配置属性,gradle插件的是否是3.0.0版本,是为true,不是为false,其他地方在配置的时候增加这个判断,如果是true,就用最新的配置,false就用老的配置。

如果大家有在升级3.0的过程,有遇到别的问题,欢迎留言交流,谢谢。

AS升级3.0,gradle plugin 升级到3.0.0遇到的问题相关推荐

  1. gradle tool升级到3.0注意事项

    Gradle版本升级 其实当AS升级到3.0之后,Gradle Plugin和Gradle不升级也是可以继续使用的,但很多新的特性如:Java8支持.新的依赖匹配机制.AAPT2等新功能都无法正常使用 ...

  2. AS升级3.1 编译报错:The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin.

    AndroidStudio升级到3.1后编译报错:The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plug ...

  3. AS升级编译报错:The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin....

    AS升级3.2.0 编译报错:The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin. 解决方法:将 ...

  4. 升级到 Android Studio 3.0 + Gradle 4.1 遇到的一些坑及解决方案

    升级到 Android Studio 3.0 + Gradle 4.1 遇到的一些坑及解决方案 参考文章: (1)升级到 Android Studio 3.0 + Gradle 4.1 遇到的一些坑及 ...

  5. The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.

    升级版本时候出现的问题 处理方法 打开项目下的gradle  修改版本为1.3.0 或者更高的版本即可.

  6. Error:This Gradle plugin requires Studio 3.0 minimum

    导入一个demo提示Error:This Gradle plugin requires Studio 3.0 minimum 在gradle.properties中导入 android.injecte ...

  7. oracle 10.2 64位,Oracle 10.2.0.5 x64升级到11.2.0.3 x64

    说明:11g数据库现在新部署的数量也很多的,对于10g数据库,现在整理一下10g到11g的升级过程.10.2.0.2以上版本才能升级到11.2.0.3版本. 升级说明:10.2.0.5(64)-> ...

  8. windows 如何安装oracle 补丁包,Windows Server 2003 上安装 Oracle10g(10.2.0.1)并升级 至补丁(10.2.0.4) 图解...

    Windows Server 2003 上安装 Oracle10g(10.2.0.1)并升级 至补丁(10.2.0.4) 图解 第一部分:安装 Oracle 10.2.0.1 1.选择安装方法 2.选 ...

  9. PyTorch 0.4新版本 升级指南 no_grad

    PyTorch 0.4新版本 升级指南 [导读]今天大家比较关心的是PyTorch在GitHub发布0.4.0版本,专知成员Huaiwen详细讲解了PyTorch新版本的变动信息, 本次升级, 只做了 ...

最新文章

  1. python读取文件读不出来-python文件读取失败怎么处理
  2. P2375 [NOI2014] 动物园 kmp fail指针/倍增
  3. python基础_格式化输出(%用法和format用法)
  4. 抖音右上角一个小黄点是什么_抖音官方入驻视频号,释放了一个什么样的信号?...
  5. MySQL学习笔记—复制表
  6. 构造函数与new关键字
  7. 九问国产操作系统,九大掌门人万字回应!
  8. 卸载mysql数据库命令,值得推荐!
  9. 区块链100讲:带你走进EOS的存储系统
  10. express : 无法将“express”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。express: command not found
  11. 拓端tecdat|R语言广义相加模型 (GAMs)分析预测CO2时间序列数据
  12. 中国互联网20年简史(1998-2018),告诉你本质是什么、规律是什么
  13. 高中数学知识点:导数的概念及运算(复习+解析+答案)
  14. 电子凸轮应用追剪算法详细图解(附PLC完整源代码)
  15. 一个简单的JS(盒子移动)
  16. 用事实说话,我们的数据库应选择RAID几?
  17. IT项目管理之第6章 项目成本管理习题选择题汇总
  18. python圆形_Python实现的圆形绘制(画圆)示例
  19. 知乎周源微信_每周源代码33-Google Chrome中的Microsoft Open Source
  20. reduce的方法详解

热门文章

  1. 大数据笔记2019.5.6
  2. 利用PermutationImportance挑选变量
  3. 基于python的螺纹钢28分钟策略
  4. Silverlight 2 Beta 1, IE 8 Beta 1, ASP.NET MVC 预览版2 可以下载了 - 思归呓语 - 博客堂
  5. Erlang Start![3]
  6. javascript学习笔记2
  7. 使用第三方库(Senparc)完成小程序支付 - z
  8. ASP.NET Core 2.1 源码学习之 Options[1]:Configure
  9. klee错误汇报二:KLEE的optimize选项的一个困惑
  10. Intent打开Activity