Crashlytics not finding API Key in crashlytics.properties at runtime

那年仲夏 提交于 2019-11-29 03:30:33
Hpsaturn

Works fine with:

# Fabric properties file: app/fabric.properties
apiSecret=xx68f6074dxxxxxc11dxxx97c172e8ebf0
apiKey=xxxe76c4xxxx97e8cxxxx0135e9d46f5a2xxx

Add on .gitignore (for open source projects)

REMOVE entry on AndroidManifest.xml:

<meta-data
    android:name="io.fabric.ApiKey"
    android:value="xxx6c41xxx6ec601xxxd4xxxa2" />

Oficial documentation: https://docs.fabric.io/android/fabric/settings/working-in-teams.html#android-projects

While this is not the answer to the original question (since Instant Run didn't exist in 2014), you may find that Instant Run can cause problems. My process was:

  • Install Fabric plugin
  • Generate Crashlytics code (including API key in the manifest)
  • Switch to fabric.properties file
  • Spend an hour trying to figure out why it wasn't working
  • Disable Instant Run -> Rebuild -> Install -> Success

I'm on Android Studio 2.0.0-beta6. This will likely be resolved in future, but this was the only resource I could find online with the same problem so hopefully I can save someone else that hour.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!