在 Android Studio 中安装 ActionBarSherlock 4.4 [英] Install ActionBarSherlock 4.4 in Android Studio

查看:22
本文介绍了在 Android Studio 中安装 ActionBarSherlock 4.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助在 Android Studio 0.2.3 中安装/实施 ActionBarSherlock 4.4.0.我尝试了多个教程并查看了此处的答案.但是没有一个适合这个初学者.

I need help installing/implementing ActionBarSherlock 4.4.0 into Android Studio 0.2.3. I have tried multiple tutorials and looked through answers on here. But none have worked for this beginner.

有没有人尝试将 ABS 4.4.0 安装到 Android Studio 中?谁能给我详细的分步说明如何做到这一点?或者给我指出一个有帮助的答案或教程?

Has anyone tried to install ABS 4.4.0 into Android Studio yet? Can anyone give me detailed step by step instructions on how to do this? Or point me to an answer or tutorial that will help?

推荐答案

我成功添加为aar依赖项,无需下载编译任何源码.

I successfully added it as aar dependency, no need to download and compile any sources.

  1. 打开工具 -> Android -> SDK Manager 并安装最新的平台和构建工具 18.0.1.

  1. Open Tools -> Android -> SDK Manager and install latest platform and build tools 18.0.1.

使用适用于 Android 2.1(API 级别 7)的 Android Studio 创建新项目,并将子项目(不是最上面的)的 build.gradle 替换为下面的.

Create new project with Android Studio for Android 2.1 (API level 7) and replace build.gradle of subproject (not the top one) with the one below.

完成最小的build.gradle,需要Android Build Tools 18版:

Complete minimal build.gradle, it needs Android Build Tools version 18:

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

apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 18
    buildToolsVersion "18.0.1"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 18
    }
}

dependencies {
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
}

这篇关于在 Android Studio 中安装 ActionBarSherlock 4.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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