【问题标题】:How to add module In Android studio如何在 Android Studio 中添加模块
【发布时间】:2015-09-03 10:30:54
【问题描述】:

我的项目中的 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 build failed 错误发生后

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

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

【问题讨论】:

标签: android


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2016-11-28
    • 1970-01-01
    • 2014-08-10
    • 1970-01-01
    • 2014-12-27
    • 2016-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多