进口ShowcaseView的gradle带 [英] importing ShowcaseView with gradle

查看:185
本文介绍了进口ShowcaseView的gradle带的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用ShowcaseView项目在我的应用程序,但无法获得项目建设。

当我运行'摇篮干净installDebug我收到以下错误:

  A出现问题评估项目根'怎么样了,它持续的。


  

找不到参数方法编译()。[工程:ShowcaseView']根工程怎么样了,它持续的


我的gradle使用1.1​​1和Android工作室0.54。

我已经下载了源代码,并使用文件导入项目 - >导入模块 - > ShowcaseView

这使我的项目结构,如:

-project

--app <​​BR/>
--ShowcaseView

我settings.gradle文件看起来像:

 包括':应用程序,ShowcaseView



在我的项目级别的build.gradle我有以下几点:

  {相关性
  编制项目(':ShowcaseView')
}

与如何正确包括任何帮助,这将是非常美联社preciated。谢谢你。


解决方案

我最近刚添加 ShowcaseView Android的工作室的项目,我希望这可以把你的正确方向。

我的文件结构看起来是这样的:


  • 项目

    • 应用

      • 的build.gradle




      • 展示


    • 的build.gradle

    • settings.gradle




  1. 库添加文件
    文件夹

    ShowcaseView 的在图书馆展示目录
    。目录


  2. 添加展示目录作为一个模块到项目中。


  3. 更改您的应用程序的的build.gradle 文件包括:

      {相关性
      编制项目(':库:展示)
    }


  4. 更​​改 settings.gradle 包括:

    包括':库:展示


  5. 同步项目的gradle与文件


这个计算器的答案越过怎么做,这是更多的细节,如果您有任何麻烦,但这种方法的作品任何库。

I'm trying to use the ShowcaseView project in my app but can't get the project to build.

when I run 'gradle clean installDebug' I get the following error:

A problem occurred evaluating root project 'hows-it-going'.

Could not find method compile() for arguments [project ':ShowcaseView'] on root project 'hows-it-going'.

I'm using gradle 1.11 and Android Studio 0.54.

I've downloaded the source, and imported the project using file -> Import module -> ShowcaseView
which makes my project structure like:

-project
--app
--ShowcaseView

my settings.gradle file looks like:

include ':app', 'ShowcaseView'


and in my project level build.gradle I have the following:

dependencies {
  compile project (':ShowcaseView')
}

Any help with how to include this properly would be much appreciated. Thanks.

解决方案

I recently just added ShowcaseView to an Android Studio project, and I hope this can push you in the correct direction.

My file structure looks something like this:

  • project
    • app
      • build.gradle
    • libraries
      • showcase
    • build.gradle
    • settings.gradle

  1. Add the files from the library folder of ShowcaseView to the showcase directory in the libraries directory.

  2. Add the showcase directory as a module to your project.

  3. Change your app's build.gradle file to include:

    dependencies {
      compile project(':libraries:showcase')
    }
    

  4. Change your settings.gradle to include:

    include ':libraries:showcase'

  5. Sync Project with gradle files

This StackOverflow answer goes over how to do this is much more detail if you have any troubles, but this method works for any library.

这篇关于进口ShowcaseView的gradle带的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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