search

Home  >  Q&A  >  body text

android studio引入第三方源包我想当做library使用它,结果报错了

Error:Execution failed for task ':app:prepareDebugDependencies'.

Dependency Error. See console for details

laucherActivity是我引入进去的包,如何在我自己的MainActivity中调用他啊,大神求指教

下面是gradle

debug:

PHP中文网PHP中文网2773 days ago652

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 13:39:04

    First gradle

    Groovy...
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:22.2.0'
        compile project(':launcherActivity')
    }
    

    Second gradle

    Groovyapply plugin: 'com.android.library'
    defaultConfig {
    //        applicationId "com.handmark.pulltorefresh.samples"
              ...
    }
    ...
    

    Correcting the Gradle files of the two projects as above should be enough

    reply
    0
  • Cancelreply