【发布时间】:2018-06-26 18:24:15
【问题描述】:
我已将 xten-framework Android 依赖库创建到 maven 存储库中,其中包含 appcompat、RecyclerView 和设计库的依赖实现。它运行良好,当我使用依赖项中的模块项目构建和运行它时没有任何问题。
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.xtensolutions.country:country-sdk:1.0.1'
implementation project(':xten-framework')
}
部署到 maven 存储库后,我从依赖项中删除了 implementation project(':xten-framework') 并添加了 implementation 'com.xtensolution.support:xten-framework:1.0. build.gradle
中的 0'repositories {
maven {
url 'https://dl.bintray.com/myusername/maven/'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.xtensolutions.country:country-sdk:1.0.1'
implementation 'com.xtensolution.support:xten-framework:1.0.0'
}
当我编译我的项目时,我得到包 android.support.v7.app.AppCompatActivity 不存在的错误
我不明白,当我的库中找到其他创建的类时,为什么在我自己的库中找不到支持 appcomapat 包。我会在哪里错误地开发一个支持 appcompat 的库项目?我想补充什么?
如果有人能给我正确的解决方案来解决这个问题,我非常感谢
【问题讨论】:
-
您是否尝试添加“implementation 'com.android.support:appcompat-v7:27.1.1'”库?
-
是的,我已经在我的库项目中添加了“com.android.support:appcompat-v7:27.1.1”作为依赖项,但仍然出现错误
标签: android android-appcompat android-library