Android Studio 一个module引用另一个模块module的方法

转自Android Studio引用另一个模块module的方法

app中有两个module,其中一个需要引用另一个的jni库,直接在app模块中引用这个类 提示无法解析这个类

android中引用别的module 需要加入对它的依赖选择了 直接修改build.gradle脚本引入的方式

修改build.gradle实现

app 模块的 build.gradle:
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support:appcompat-v7:26.1.0'
      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.1'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

      implementation project(':module') // 添加依赖模块
  }

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章