问题描述
我要导入库项目到我的应用程序,但每当我试图这样做,Android的工作室不承认它
这也给了我错误build.gradle ..
图书馆是:PagerSlidingTabStrip ....
下面是一些图片:
我一直在试图让3天工作至今!请帮我:)
修改
应用插件:机器人库
依赖{
编译com.android.support:support-v4:19.0.0
}
安卓{
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 {
主要 {
manifest.srcFile的AndroidManifest.xml
java.srcDirs = ['src'中]
res.srcDirs = ['水库']
}
}
}
从适用:https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle
EDIT2:的
失败:建立失败,一个例外。
* 什么地方出了错:
发生问题配置项目:Sahertoday。
>未能解决所有依赖关系配置:Sahertoday:_debugCompile。
>找不到com.astuetz:pagerslidingtabstrip:1.0.1。
要求:
Saher-3:Sahertoday:不详
* 尝试:
与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项运行,以获得更多的日志输出。
构建失败
首先,你可以添加这个依赖于你的项目,没有本地编译库。
相关性{
编译com.astuetz:pagerslidingtabstrip:1.0.1
}
另外,如果你想在本地编译此lib中,你必须在根定义gradle.properties这些键。
ANDROID_BUILD_TARGET_SDK_VERSION = 19
ANDROID_BUILD_TOOLS_VERSION = 19
ANDROID_BUILD_SDK_VERSION = 19
I want to import a library project into my app but whenever I try to do so , Android Studio doesn't recognise it
It also gives me errors in build.gradle ..
The Library is : PagerSlidingTabStrip ....
Here are some pictures :
I have been trying to make it work for 3 days so far !!Please Help Me :)
EDIT:
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
First of all, you can add this dependency to your project, without compiling the lib locally.
dependencies {
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
}
Otherwise if you would like to compile this lib locally, you have to define these keys in gradle.properties in the root.
ANDROID_BUILD_TARGET_SDK_VERSION=19
ANDROID_BUILD_TOOLS_VERSION=19
ANDROID_BUILD_SDK_VERSION=19
这篇关于导入Facebook的库在Android的工作室:找不到属性“ANDROID_BUILD_SDK_VERSION”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!