【发布时间】:2014-02-24 00:26:56
【问题描述】:
我想将一个库项目导入我的应用程序,但每当我尝试这样做时,Android Studio 都无法识别它
它还在 build.gradle 中给了我错误..
库是:PagerSlidingTabStrip ....
这里有一些图片:
到目前为止,我一直在努力让它工作 3 天! 请帮帮我:)
编辑:
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:19.0.0'
}
android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
minSdkVersion 8
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
EDIT2:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':Sahertoday'.
> Could not resolve all dependencies for configuration ':Sahertoday:_debugCompile'.
> Could not find com.astuetz:pagerslidingtabstrip:1.0.1.
Required by:
Saher-3:Sahertoday:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
【问题讨论】:
-
请发布您的 build.gradle 文件。你是如何声明那个库的?
-
这是库的 build.gradle ..
标签: java android android-studio gradle pagerslidingtabstrip