gpt4 book ai didi

android - 如何用jar文件替换谷歌依赖

转载 作者:行者123 更新时间:2023-11-30 00:14:08 24 4
gpt4 key购买 nike

我将在我的 android 项目中实现 google firebase 消息传递。 Google 文档提供使用依赖项。我很困惑,如果我可以导入 JAR 文件而不是依赖项,或者 JAR 和依赖项都需要?将使用 this method 导入 JAR 文件够了吗?

这是 Google 文档:

dependencies {
compile 'com.google.firebase:firebase-messaging:11.6.2'
}

这是谷歌 JAR 文件的列表:

https://github.com/nsiatras/Google-Play-Firebase-jars/tree/master/Version%209.0.1/firebase

最佳答案

理论上也可以导入JAR文件。但是,困难的是找出这个依赖的依赖,这个依赖的依赖的依赖等等,直到解决所有的依赖。

在 Eclipse 中,您可以使用 Eclipse Buildship解决 Gradle 依赖关系。

repositories {
maven {
url 'https://maven.google.com'
}
}

依赖项 com.google.firebase:firebase-messaging:11.6.2 解析为以下 JAR/AAR 文件:

https://maven.google.com/com/google/firebase/firebase-messaging/11.6.2/firebase-messaging-11.6.2.aar
https://maven.google.com/com/google/firebase/firebase-iid/11.6.2/firebase-iid-11.6.2.aar
https://maven.google.com/com/google/android/gms/play-services-basement/11.6.2/play-services-basement-11.6.2.aar
https://maven.google.com/com/google/firebase/firebase-common/11.6.2/firebase-common-11.6.2.aar
https://maven.google.com/com/google/firebase/firebase-messaging-license/11.6.2/firebase-messaging-license-11.6.2.aar
https://maven.google.com/com/google/android/gms/play-services-tasks/11.6.2/play-services-tasks-11.6.2.aar
https://maven.google.com/com/google/firebase/firebase-iid-license/11.6.2/firebase-iid-license-11.6.2.aar
https://maven.google.com/com/android/support/support-v4/25.2.0/support-v4-25.2.0.aar
https://maven.google.com/com/google/android/gms/play-services-basement-license/11.6.2/play-services-basement-license-11.6.2.aar
https://maven.google.com/com/google/firebase/firebase-common-license/11.6.2/firebase-common-license-11.6.2.aar
https://maven.google.com/com/google/android/gms/play-services-tasks-license/11.6.2/play-services-tasks-license-11.6.2.aar
https://maven.google.com/com/android/support/support-compat/25.2.0/support-compat-25.2.0.aar
https://maven.google.com/com/android/support/support-media-compat/25.2.0/support-media-compat-25.2.0.aar
https://maven.google.com/com/android/support/support-core-utils/25.2.0/support-core-utils-25.2.0.aar
https://maven.google.com/com/android/support/support-core-ui/25.2.0/support-core-ui-25.2.0.aar
https://maven.google.com/com/android/support/support-fragment/25.2.0/support-fragment-25.2.0.aar
https://maven.google.com/com/android/support/support-annotations/25.2.0/support-annotations-25.2.0.jar
https://maven.google.com/com/android/support/support-compat/25.2.0/support-compat-25.2.0-sources.jar
https://maven.google.com/com/android/support/support-media-compat/25.2.0/support-media-compat-25.2.0-sources.jar
https://maven.google.com/com/android/support/support-core-utils/25.2.0/support-core-utils-25.2.0-sources.jar
https://maven.google.com/com/android/support/support-core-ui/25.2.0/support-core-ui-25.2.0-sources.jar
https://maven.google.com/com/android/support/support-fragment/25.2.0/support-fragment-25.2.0-sources.jar
https://maven.google.com/com/android/support/support-annotations/25.2.0/support-annotations-25.2.0-sources.jar

另请参阅:How to integrate .aar file to Eclipse

关于android - 如何用jar文件替换谷歌依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47599786/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com