How to make Android app automatically configure w/ debug vs. release values?

前端 未结 6 2146
故里飘歌
故里飘歌 2021-02-10 14:13

I\'m working on an Android app, specifically one that uses the Facebook Android SDK. In development mode, I\'m working with a test Facebook app that goes by one ID. However, i

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-10 14:43

    With Eclipse I create 3 projects in the workspace :

    • ApplicationProject

    It is a library project Contain all source code In values/refs.xml I add

    true
    
    • ApplicationProjectDEBUG

    Use ApplicationProject Overide AndroidManifest and other xml file with developement specific config In values/refs.xml I add

    true
    
    • ApplicationProjectPROD

    Use ApplicationProject Overide AndroidManifest and other xml file with production specific config In values/refs.xml I add

    false
    

    I signe APK from this project to put on the store

提交回复
热议问题