【问题标题】:How can I add a line to Android Dependencies?如何向 Android 依赖项添加一行?
【发布时间】:2016-10-06 07:09:53
【问题描述】:

这是一个例子:

androidTestCompile 'com.android.support:support-annotations:23.3.0'

我在哪里添加这个?

【问题讨论】:

  • 在依赖博客的 app/build.gradle 中。请删除这个问题很容易
  • @KonradKrakowiak 简单是相对的,不要居高临下
  • 这很简单,但我有一个 Android 任务。而且我以前从未碰过它。所以,不要那样做。
  • 我的意思是你可以很快在谷歌上找到答案
  • 很抱歉,我不会居高临下。我只是标记你应该先在谷歌中检查它

标签: android android-studio gradle


【解决方案1】:

将此行添加到您的应用程序 gradle(build.gradle(Module:app)) 下的依赖项中。

dependencies 
{
 compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'

  Compile 'com.android.support:support-annotations:23.3.0'

}

【讨论】:

    猜你喜欢
    • 2018-05-27
    • 1970-01-01
    • 2016-03-22
    • 2012-12-30
    • 2014-09-15
    • 2015-07-22
    • 2013-11-03
    • 2017-03-07
    • 2015-12-09
    相关资源
    最近更新 更多