Where to put own properties file in an android project created with Android Studio?

后端 未结 4 1737
别跟我提以往
别跟我提以往 2021-01-01 19:50

I just started to use Android Studio. I don\'t know where to put my own properties file since there is no assets folder in the project structure.

The posted snippet

4条回答
  •  再見小時候
    2021-01-01 20:20

    By default assets folder is placed in src/main/assets, if it does not exists create it.

    Then you can access the file using something like this:

    getBaseContext().getAssets().open("app.properties")
    

    You can find more info about Gradle Android project structure here.

提交回复
热议问题