Fabric/Crashlytics on Android - How to have two different crashlytics projects with the same package name?

前端 未结 2 2093
轮回少年
轮回少年 2021-02-14 12:38

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

2条回答
  •  醉话见心
    2021-02-14 13:26

    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 crashlyticsApiKey for each of your project on fabric.

    Then on your 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']
        }
    

    Then you will put this variable on meta-data at your AndroidManifest.xml file

    
    

    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

提交回复
热议问题