【问题标题】:Referencing an imported module from an App (Licensing LVL)从应用程序引用导入的模块(许可 LVL)
【发布时间】:2018-02-26 16:41:44
【问题描述】:

我按照如何为 Android 应用设置许可的说明进行操作,但我一直在引用导入的模块。

https://developer.android.com/google/play/licensing/setting-up.html#download-lvl

在我的屏幕上看到,我已将模块导入我的应用程序项目 -> “lvlLibrary”。

如何从我的 Apps 项目中引用该库?

项目结构:

我的 gradle(应用程序):

dependencies {
//    compile project(':lvlLibrary') <- I TRIED THIS, BUT IT DOESN'T WORK.
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    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'
}

【问题讨论】:

    标签: android android-lvl android-module


    【解决方案1】:

    解决了: 添加

    implementation project(':lvlproject')
    compile project(path: ':lvlproject')
    

    to gradle (app) 成功了。

    【讨论】:

      猜你喜欢
      • 2015-06-11
      • 1970-01-01
      • 2021-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-09
      • 2020-06-01
      • 2021-03-16
      相关资源
      最近更新 更多