Error:Could not determine the class-path for interface com.android.builder.model.NativeAndroidProjec
来源:互联网 发布:训练智力软件 编辑:程序博客网 时间:2024/04/27 17:38
出现这个错误一般是在高版本的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:\Users\Jason\.gradle\wrapper\dists\gradle-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:\AppsBackup\libs\jackson-annotations-2.4.0.jar File2: C:\AppsBackup\libs\jackson-core-2.4.0.jar File3: C:\AppsBackup\libs\jackson-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'}
2 0
- Error:Could not determine the class-path for interface com.android.builder.model.NativeAndroidProjec
- Could not determine the class-path for interface com.android.builder.model.NativeAndroidProjec
- 解决Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject
- 解决Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- Could not determine the class-path for interface com.android.builder.model.AndroidProject
- Gradle 'XNote' project refresh failed Error:Could not determine the class-path for interface com
- idea Could not determine the class-path for interface org.jetbrains.kotlin.gradle.KotlinGradleModel.
- Could not determine type for: com.zyc.oa.model.Organization, at table
- ERROR (DiscoveryFailure): Could not determine a suitable URL for the plugin
- interface builder could not open the document ... does not exist
- Error:Could not determine the dependencies of task ':app:transformClassesWithInstantRunForDebug'.
- Could not determine type for: model.Student, at table: Contact, for columns: [org.hibernate.mapping.
- Error:Execution failed for task ':app:resolveDebugDependencies'. > Could not initialize class com.an
- QT Creator中出现could not determine the path to binaries的解决方法
- error:Could not determine type for: XXpojo, at table: XX表, for colum
- Error:Could not initialize class com.android.ide.common.util.ReadWriteProcessLock 解决办法
- 什么是机器学习?
- scikit-learn 文本挖掘概念
- POI Workbook接口和HSSFWorkbook对象和XSSFWorkbook对象操作相应excel版本
- C# 委托(Delegate)
- 【递推】洛谷 P1095 守望者的逃离
- Error:Could not determine the class-path for interface com.android.builder.model.NativeAndroidProjec
- 数组和两个数的和为20的组合
- C# 事件(Event)
- 图片在IE8浏览器多一个有边框问题解决办法
- 哈哈,我是一个介绍
- C# 集合(Collection)
- C++实验五-数组分奇偶
- 1、Java虚拟机之内存区域
- ADC7606源代码