【问题标题】:import android support library with resources with IntelliJ使用 IntelliJ 导入带有资源的 android 支持库
【发布时间】:2014-01-12 14:04:49
【问题描述】:

如何将带有资源的 android 支持库导入 IntelliJ IDE 中的 android 项目。

我目前正在使用 IntellJ13,并且我的计算机上安装了 gradle。我已经检查了以下内容,但这在 Intellij 中不起作用

http://developer.android.com/tools/support-library/setup.html

【问题讨论】:

  • 那么,如果您使用的是 Gradle,您是否按照说明添加了依赖项(例如 compile "com.android.support:appcompat-v7:18.0.+")?请发布您的build.gradle 以及您收到的任何错误消息。
  • 是的,我做到了,我得到了未知语法。创建默认 android 项目时,Intellij 不会创建 build.gradle 文件。我的猜测是我在项目中配置 gradle 时遇到问题。 (如果它是相关的,我正在使用 Windows)
  • 我认为你应该通过IDEA's Android Gradle documentation(“创建 Gradle-Android 项目”)。如果您仍然遇到问题,您可以随时尝试 Android Studio,它基本上是相同的 IDE,但专门针对 Android。使用 AS,添加支持库依赖非常简单。
  • 你能用 AndroidStudio 代替 IntelliJ13 吗?我已经能够毫无问题地将支持库包含在 AS 项目中。
  • 如果你的项目中没有 build.gradle 文件,那么它一定不是基于 Gradle 的。你确定不需要通过普通的 IntelliJ 方式添加支持库,而不是通过 Gradle?

标签: android intellij-idea gradle android-support-library android-gradle-plugin


【解决方案1】:

这是在 IntelliJ IDEA 中导入 android 支持库的分步指南 http://aloyzije.blogspot.com/2014/01/importing-support-libraries-for-android.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-16
    • 2015-07-23
    • 2022-01-14
    • 1970-01-01
    • 2014-12-30
    • 1970-01-01
    相关资源
    最近更新 更多