当任何应用程序使用我的库时,如何确保我的库的 "v7 appcompat or support" 没有冲突?
How do make sure there is no conflict of "v7 appcompat or support" of my library when any application uses my library?
我有一个 android 库,在 gradle 中有 com.android.support:appcompat-v7:23.0.1
依赖项。
假设任何具有不同版本 com.android.support:appcompat-v7:23.3.0
的应用程序在该应用程序的 build.gradle 中使用我的库。
以下是我有疑问的问题列表。
android采用哪个版本?低一级还是高一级?我怎么看?
如果我使用24或25及以上或相同的不同版本,会不会有任何冲突?
当任何应用程序使用我的库时,如何确保没有 v7 appcompat 冲突?
- which version does the android take? Lower one or Higher one? How do i see it?
Gradle 使用较高的那个。
您可以使用命令 gradlew dependencies
检查依赖关系树。
- Won't there be any conflict if i use different version like 24 or 25 and above or same?
- How do i make sure there is no conflict of v7 appcompat when any app uses my library?
一般来说,维护库和避免冲突的最佳方法是始终使用最新的支持库来更新库。
What if the compiledSDK of application is 23 with appcompat-v7:23.3.0 and and that of the library is 24 with appcompat-v7:24+. Which all support libraries does the android take?
如果您的库使用支持库 v24,则库和应用程序将需要使用相同级别 = 24 进行编译。
我有一个 android 库,在 gradle 中有 com.android.support:appcompat-v7:23.0.1
依赖项。
假设任何具有不同版本 com.android.support:appcompat-v7:23.3.0
的应用程序在该应用程序的 build.gradle 中使用我的库。
以下是我有疑问的问题列表。
android采用哪个版本?低一级还是高一级?我怎么看?
如果我使用24或25及以上或相同的不同版本,会不会有任何冲突?
当任何应用程序使用我的库时,如何确保没有 v7 appcompat 冲突?
- which version does the android take? Lower one or Higher one? How do i see it?
Gradle 使用较高的那个。
您可以使用命令 gradlew dependencies
检查依赖关系树。
- Won't there be any conflict if i use different version like 24 or 25 and above or same?
- How do i make sure there is no conflict of v7 appcompat when any app uses my library?
一般来说,维护库和避免冲突的最佳方法是始终使用最新的支持库来更新库。
What if the compiledSDK of application is 23 with appcompat-v7:23.3.0 and and that of the library is 24 with appcompat-v7:24+. Which all support libraries does the android take?
如果您的库使用支持库 v24,则库和应用程序将需要使用相同级别 = 24 进行编译。