添加Umano的Andr​​oidSlidingUpPanel为Android Studio库 [英] Adding Umano's AndroidSlidingUpPanel as an Android Studio Library

查看:110
本文介绍了添加Umano的Andr​​oidSlidingUpPanel为Android Studio库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这几个小时,我仍然不能得到Umano的向上滑动面板库在Android Studio中工作(的 https://github.com/umano/AndroidSlidingUpPanel )。

I've been at this for hours and I still can't get Umano's sliding up panel library to work in android studio ( https://github.com/umano/AndroidSlidingUpPanel ).

我创建了我的项目,复制源库里面的根库目录下,并添加以下内容:

I created a "Libraries" directory at the root of my project, copied the library sources inside, and added the following:

-settings.gradle:包括图书馆:AndroidSlidingUpPanel:库',':MyProject的

-settings.gradle : include 'Libraries:AndroidSlidingUpPanel:library', ':MyProject'

- 项目的build.gradle:编制项目(':图书馆:AndroidSlidingUpPanel:库')

-project build.gradle : compile project(':Libraries:AndroidSlidingUpPanel:library')

我尝试了一切,我可以得到它的编译,但一旦我使用

I've tried everything, I can get it to compile but once I use the

</com.sothree.slidinguppanel.SlidingUpPanelLayout>

在失败编译布局。

BTW如果我不降级.7我的build.gradle的路径的gradle(是0.8),我得到在编译时错误。

BTW If I don't downgrade my build.gradle's gradle path to .7 (was .8) , I get an error at compilation time.

我有行家设置为一个依赖,同时列为在图书馆和我的项目依赖的v4.13.0.0支持库。

I have maven setup as a dependency and the v4.13.0.0 support library listed as a dependency both in the library and my project.

我到处找,我不能得到答案为这个?任何人都可以创建一个项目,这包括为库提供了一个循序渐进的指南

I have looked everywhere, I cannot get an answer for this: can anyone provide a step by step guide to creating a project and including this as a library?

感谢

编辑 - clarift:

EDIT - To clarift:

如果我做到以上的和降级我:

If I do all of the above and downgrade my :

buildscript {
  dependencies {
    classpath 'com.android.tools.build:gradle:0.8.+'
  }

buildscript {
  dependencies {
    classpath 'com.android.tools.build:gradle:0.7.+'
  }

我得到的项目进行编译。但是如果我使用的布局从库:

I get the project to compile. However if I use the layout from the library:

<com.sothree.slidinguppanel.SlidingUpPanelLayout
    android:id="@+id/sliding_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="bottom"
    >

我收到以下错误:错误:错误的解析XML:在SlidingUpPanel布局节点上绑定preFIX。这意味着库没有,事实上,编译并正确地包含。
这就是为什么我要求一步步这个库到一个新的Andr​​oid Studio项目上ADDID一步。

I get the following error: error: Error parsing XML: unbound prefix on the SlidingUpPanel layout node. This means the library did not, in fact, compile and include correctly. That is why I was asking for a step by step on addid this library to a new Android Studio project.

推荐答案

直到Android的工作室达到1.0,你就必须更新Android Studio中,Android的摇篮插件,而你使用的步调一致的摇篮版本。一旦我们在Android Studio和插件打到1.0,我们将有更好的向后兼容性。

Until Android Studio reaches 1.0, you'll have to update Android Studio, the Android Gradle plugin, and the version of Gradle you're using in lockstep. Once we hit 1.0 on Android Studio and the plugin, we'll have much better backward compatibility.

如果你使用的Andr​​oid 0.4.0工作室或更高版本(这我强烈建议,实际上它应该为您提供一个至少升级到0.4.2),那么你需要使用的V0.8插件:

If you're using Android Studio 0.4.0 or later (which I'd strongly recommend; in fact it should be offering you an upgrade to at least 0.4.2), then you need to use v0.8 of the plugin:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
       classpath 'com.android.tools.build:gradle:0.8.+'
    }
}

这需要摇篮​​1.10。你通常在 gradle这个/封装/ gradle-wrapper.properties文件中指定该这一行:

This requires Gradle 1.10. You usually specify this in the gradle/wrapper/gradle-wrapper.properties file with this line:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip

在IDE应该检查版本号,并提供给您更新一切,但该机制不工作很正确呢。有时工作,有时没有。

The IDE should be checking version numbers and offering to update everything for you, but that mechanism isn't working quite right yet. It sometimes works, sometimes doesn't.

这篇关于添加Umano的Andr​​oidSlidingUpPanel为Android Studio库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆