簡體   English   中英

如何在Android Studio中添加模塊

[英]How to add module In Android studio

我在我的項目中的daimaja AndroidImageSlider庫的導入模塊在這里是鏈接https://github.com/daimajia/AndroidImageSlider

現有的模塊名稱是library .i已經具有庫模塊名稱

我更改名稱模塊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

然后,將其作為庫依賴項添加到Application。(模塊設置):

 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM