android - Android studio 中如何添加模块

标签 android

我在我的项目中导入了 daimaja AndroidImageSlider 库的模块 这是链接 https://github.com/daimajia/AndroidImageSlider

现有的模块名称是库。我已经有了库模块名称

我更改名称模块 imageslider 并导入

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "com.technosoftera.tradegateway"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':imageslide')
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
    compile files('libs/gson-2.3.1.jar')
    compile files('libs/okhttp-urlconnection-2.5.0.jar')
    compile  'com.wunderlist:sliding-layer:1.2.5'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.androidanimations:library:1.0.3@aar' 
}

上面是我在依赖中添加的gradle文件

gradle 构建失败后发生错误

Error:No such property: GROUP for class: org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer

这是错误请帮忙导入这个库

最佳答案

将模块放入应用程序项目中:

Right click on Application->Open Module Settings -> Click on the '+' icon ->
Select the root directory for your library module you'd like to add ->
Follow the prompts

然后,将其作为库依赖项添加到应用程序中。(模块设置):

 Select your Application module -> Select the Dependencies tab on the right ->
 Click the '+' icon on the bottom -> Select Module Dependency -> Select your 
desired library module

关于android - Android studio 中如何添加模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32373169/

相关文章:

android - 任务 ':app:processDebugResources' 执行失败。 > 安卓资源链接失败

php - 如何使用指定参数的 Android Volley GET 方法?

android - 如何在 android 中为 HttpGet 请求添加 NameValuePairs

Android 数据绑定(bind) : how to get field value of kotlin enum class?

android - 在android中,如何在代码中设置layout_marginRight

Java多线程: Passing camera frame to running worker thread

Android 通过什么在 Facebook 上分享?

android - Facebook SDK 不适用于 Android Studio

android - 立即调用 Intent(Settings.ACTION_SETTINGS) 的 onActivityResult

android - 导航标题显示/初始化错误