zoukankan      html  css  js  c++  java
  • Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject

    http://blog.csdn.net/ithouse/article/details/71248820http://blog.csdn.net/ithouse/article/details/71248820

    出现这个错误一般是在高版本的AndroidStudio里导入旧版本的gradle项目,需要:
    1. 打开build.gradle(Project :)文件,修改classpath为(如果不知道应该修改为多少,请新建一个项目,参考新建项目里的classpath):

    classpath 'com.android.tools.build:gradle:2.3.1'

    打开gradle/wrapper/gradle-wrapper.properties文件,修改distributionUrl为
    distributionUrl=http://services.gradle.org/distributions/gradle-3.3-all.zip

    或本地相关distribution,然后重试。遇到下载很慢的情况,请手动下载相关distribution,复制到如下目录即可。

    C:UsersJason.gradlewrapperdistsgradle-3.3-all对应文件夹

    如遇到类似如下错误:

    Error:Execution failed for task ':transformResourcesWithMergeJavaResForDebug'.
    > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
    File1: C:AppsBackuplibsjackson-annotations-2.4.0.jar
    File2: C:AppsBackuplibsjackson-core-2.4.0.jar
    File3: C:AppsBackuplibsjackson-databind-2.4.0.jar

    则在gradle文件的Android节点下添加如下信息:

    packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
    }

  • 相关阅读:
    Spring Security(06)——AuthenticationProvider
    Spring Security(05)——异常信息本地化
    Spring Security(04)——认证简介
    Spring Security(03)——核心类简介
    Spring Security(02)——关于登录
    Spring Security(01)——初体验
    核心服务
    技术概述
    Security命名空间配置
    Spring Security
  • 原文地址:https://www.cnblogs.com/bluestorm/p/7390670.html
Copyright © 2011-2022 走看看