- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我将项目“forecastie-master-master”从 GitHub 导入到我自己的项目中。我按照导入项目的步骤进行操作。请帮我解决这个错误,我是导入项目的新手。
我自己的项目的gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.bumbleshet.tourpinas3"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
buildToolsVersion '26.0.2'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
// implementation 'com.android.support:design:26.0.0'
//implementation 'com.android.support:design:26.0.0'
//imlementation 'com.android.support:support-v4:26.0.0'
implementation 'com.android.support:design:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
//implementatoin 'com.android.support.constraint:constraint-layout:1.0.2'
// implementation 'com.google.android.gms.play-servies:11.8.0'
implementation 'com.lapism:searchview:4.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-places:11.8.0'
//implementation project (':app2')//{
// exclude group: 'com.android.support', module:'library'
//}
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation project(':app2')
}
apply plugin: 'com.google.gms.google-services'
my imported project's gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "cz.martykan.forecastie"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
checkReleaseBuilds true
abortOnError false
xmlReport true
htmlReport true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
buildToolsVersion '26.0.2'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
implementation 'com.google.android.apps.dashclock:dashclock-api:+'
implementation 'com.roughike:bottom-bar:1.4.0.1'
implementation 'com.diogobernardino:williamchart:2.2'
}
include ':app2',':app'
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :app2. <a href="openFile:C:../build.gradle">Open File</a><br><a href="Unable to resolve dependency for ":app@debug/compileClasspath": Could not resolve project :app2.">
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :app2. <a href="openFile:C:../build.gradle">Open File</a><br><a href="Unable to resolve dependency for ":app@debug/compileClasspath": Could not resolve project :app2.">
Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :app2. <a href="openFile:C:../build.gradle">Open File</a><br><a href="Unable to resolve dependency for ":app@debug/compileClasspath": Could not resolve project :app2.">
Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :app2. <a href="openFile:C:../build.gradle">Open File</a><br><a href="Unable to resolve dependency for ":app@debug/compileClasspath": Could not resolve project :app2.">
Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve project :app2. <a href="openFile:C:../build.gradle">Open File</a><br><a href="Unable to resolve dependency for ":app@debug/compileClasspath": Could not resolve project :app2.">
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :app2. Could not resolve project :app2.
Unable to find a matching configuration of project :app2: - Configuration 'debugApiElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' and found compatible value 'java-api'. - Configuration 'debugMetadataElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Metadata'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' but no value provided. - Configuration 'debugRuntimeElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' and found incompatible value 'java-runtime'. - Configuration 'profileApiElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found incompatible value 'profile'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'profile' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' and found compatible value 'java-api'. - Configuration 'profileMetadataElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found incompatible value 'profile'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Metadata'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'profile' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' but no value provided. - Configuration 'profileRuntimeElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found incompatible value 'profile'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'profile' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' and found incompatible value 'java-runtime'. - Configuration 'releaseApiElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found incompatible value 'release'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' and found compatible value 'java-api'. - Configuration 'releaseMetadataElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found incompatible value 'release'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Metadata'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' but no value provided. - Configuration 'releaseRuntimeElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found incompatible value 'release'. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'. - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required. - Required org.gradle.api.attributes.Usage 'java-api' and found incompatible value 'java-runtime'.
最佳答案
您不能将“Apk”作为模块导入应用程序。它必须是“Aar”。
错误:
Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found incompatible value 'Apk'
apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
关于安卓 3.0.1 错误 :Unable to resolve dependency for ':app@debug/compileClasspath' : Could not resolve project :app2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48852632/
情况: 创建最简单的项目 作为文件添加到项目模块 -> 新建 -> 新模块“手机和平板电脑模块” 添加对模块的依赖 并得到错误: 无法解析 ':app@debug/compileClasspath'
当我迁移到 com.android.tools.build:gradle:3.0.0-beta3 和 Gradle 4.1 时,我看到以下错误: Caused by: org.gradle.api.a
我的项目分为4个模块 commmon https://pastebin.com/EiRL7Snk (build.gradle) core https://pastebin.com/n1b1xWMb (
从阅读如何improve Gradle build performance ,我知道不应该在配置阶段下载依赖项。 我使用远程构建缓存总是在空的 Docker 容器中从头开始运行构建。 我的构建总是下载
我是 Gradle 新手,但渴望学习如何使用这个工具。我的问题是 - 我的 gradle 3.4.1 不下载依赖项。特别是,compile group: 'org.springframework',
我尝试将一个库添加到我的 android studio 项目中,但它给了我以下错误: Unable to resolve dependency for ':app@debug/compileClass
我有一个 android 项目,我使用 android studio 2.3 开发它之后我将 android studio 更新到 3.3 并用新版本打开这个项目但是有很多错误解决了很多但有新错误所以
我正在尝试在 Android Studio 中升级到 gradle 3.2.1,但是 gradle 构建失败并出现以下错误。 FAILURE: Build failed with an except
新安装的 Android studio 3.1.3 在创建新项目和第一次编译时出现奇怪的依赖错误。 类似的question这无助于解决问题。 事件日志: Unable to resolve depen
我正在使用Windows 10和Android Studio版本3.2.1 我面临拖曳问题: 1-当我尝试在SDK管理员中更新或安装软件包时,出现以下消息: Installation did not
请帮忙, 在我设置并按照以下说明进行操作后: 配置离线构建依赖项 如果您想在没有网络连接的情况下构建项目, 按照以下步骤将 IDE 配置为使用离线版本的 Android Gradle 插件和 Goog
我正在开发 Android 应用程序,它的项目太大了,有很多类,但今天我正在尝试创建一个新类,然后我得到了这段代码: import androidx.appcompat.app.AppCompatAc
对于我使用的帮助库,我最近得到: Error:Unable to resolve dependency for ':app@debug/compileClasspath': Failed to tra
我有一个要作为模块导入到我的项目中的 android 应用程序。该模块与 apply plugin: 'com.android.application' 同步和编译良好但是,我想在我的项目中使用模块中
我正在开发一个由某人创建的 android 项目。在我的 Android studio 中打开这个项目后,它给出了一个错误: ERROR: Unable to resolve dependency f
当我开始一个新项目时,弹出这些错误 Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve
当我打开任何新项目时,gradle会显示此错误 ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Faile
我正在尝试在 jitpack.io 上发布我的 android 库,但是当我尝试添加依赖项来测试我的工件时,我收到了这个错误: Unable to resolve dependency for ':a
当我尝试同步 gradle 时出现此错误。我正在使用 Android Studio 3.5 和 gradle 5.4.1 。它在这种配置下运行良好,但突然间我开始收到此错误。 **ERROR**: U
我将 android 的 firebase quickstart analytics 作为 Android Studio 项目导入,但是当我尝试同步它时,我遇到了这些错误: 我已经尝试了很多来自其他主
我是一名优秀的程序员,十分优秀!