gpt4 book ai didi

android - 无法在 Android Studio 中使用 github 库

转载 作者:行者123 更新时间:2023-12-03 06:18:35 24 4
gpt4 key购买 nike

我想使用 this library在 Android Studio 的一个项目中,如阅读我所述,我在 Android Studio 中创建了新项目,并在 app 文件夹内的 build.gradle 文件中添加了依赖项:

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.mycompany.swipe_instagram"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
mavenCentral()
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.lorentzos.swipecards:library:1.0.8@aar'
}

然后,当我同步时,我开始收到此错误:

Failed to find file

我在谷歌和堆栈溢出上进行了搜索,但找不到任何合适的解决方案。

最佳答案

我使用了你的“build.gradle”文件,它对我来说工作正常(有和没有“aar”)。可能是缓存有问题。尝试“文件-> 使缓存无效/重新启动”)。生成更多错误消息详细信息的另一种方法是尝试从命令行构建模块并获取详细输出

gradle -info compileDebugSources

你会得到很多输出,这些输出应该给你一个关于出了什么问题的提示

关于android - 无法在 Android Studio 中使用 github 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28262751/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com