面料/ Crashlytics在Android上 - 如何使用相同的包名称有两个不同的crashlytics项目? [英] Fabric/Crashlytics on Android - How to have two different crashlytics projects with the same package name?
问题描述
我正在开发一个Android应用程序,并且我想在Crashlytics / Fabric中有两个不同的项目(调试和发布)。
我知道这可以通过两个不同的包名称,但在我的情况下,这两个构建类型的包名称必须相同。
是否有任何可能让两个crashlytics项目具有相同的包名称?
您需要2个组织,每个组织都有不同的 crashlyticsApiKey
。
然后在 然后你将这个变量放在你的 就是这样,现在为relase和debug构建您的项目,您将看到您的应用程序将注册为2个不同的结构帐户与相同的软件包nam I am developing an Android application and I want to have two different projects in Crashlytics / Fabric (debug and release). I know that this is possible by having two different package names, but in my case, the package name of these two build types have to be the same. Is there any possibility to have two crashlytics projects with the same package name? Hello I also had same questions months ago and I solved it myself. Hope my answer will help you. You need 2 organizations with different Then on your Then you will put this variable on meta-data at your That's all, now build your project both for relase and debug, you will see your app will registered for 2 different fabric account with same package nam 这篇关于面料/ Crashlytics在Android上 - 如何使用相同的包名称有两个不同的crashlytics项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! build.gradle
文件中定义 manifestPlaceHolders $ c $
$ debug {
manifestPlaceholders = [crashlyticsApiKey:'your_api_key_for_debug_project_here']
}
release {
manifestPlaceholders = [crashlyticsApiKey:'your_api_key_for_release_project_here']
}
AndroidManifest.xml
文件中的meta-data上。
< meta-data
android:name =io.fabric.ApiKey
android:value =$ {crashlyticsApiKey}/>
crashlyticsApiKey
for each of your project on fabric.build.gradle
file you will define manifestPlaceHolders
debug {
manifestPlaceholders = [crashlyticsApiKey: 'your_api_key_for_debug_project_here']
}
release {
manifestPlaceholders = [crashlyticsApiKey: 'your_api_key_for_release_project_here']
}
AndroidManifest.xml
file<meta-data
android:name="io.fabric.ApiKey"
android:value="${crashlyticsApiKey}" />