zoukankan      html  css  js  c++  java
  • 转 - Android Studio 低版本Gradle升级到高版本时常见问题

    来自: http://blog.csdn.net/feiniao8651/article/details/44652753

    今天拿到一个用低版本Gradle的编译的Android工程,gradle对版本的向下兼容做的不太好,因此在高版本Gradle的电脑上会出很多问题。

    1. Error:The project is using an unsupported version of the Android Gradle plug-in (0.12.2). The recommended version is 1.0.0.

    <a href="fixGradleElements">Fix plugin version and re-import project</a>

    解决方法:直接点击下面的Fix plugin version and re-import project。

    2.Error:(17, 0) Gradle DSL method not found: 'runProguard()'

    解决方法:app build.gradle中 runProguard改为minifyEnabled

    3. Error:No such property: projectDependencies for class: com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated

    解决方法:project build.gradle 中  'com.neenbedankt.gradle.plugins:android-apt:1.3+'  中的版本号1.3+改为1.4
    4.Error:(29, 0) Could not find property 'processResources' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@284d979f.

    参考:https://bitbucket.org/hvisser/android-apt/issue/26/gradle-plugin-version-0143-remove

    androidManifestFile variant.processResources.manifestFile 改为 androidManifestFile variant.outputs[0].processResources.manifestFile

    5.编译时出现aapt.exe已停止工作

    参考:http://stackoverflow.com/questions/21645961/android-studio-processdebugresources-failed

    解决方法:该问题出现于compileSdfVersion为21时,只要将buildToolsVersion改为21.0.2(或更高的版本)就可以了。

    注:

    本人遇到了问题1-4问题。到第四个问题的时候,找到了原文,解决好后,觉得这篇文章比较有帮助,就转了过来。。。

  • 相关阅读:
    【数据结构】KMP算法
    【数据结构】银行问题
    ejs模板渲染页面
    node的知识点
    http搭建服务器
    http接收页面传递的数据
    http模块
    node的http模块
    node的fs模块
    base.css
  • 原文地址:https://www.cnblogs.com/restart/p/4655933.html
Copyright © 2011-2022 走看看