How to get a versionName in react-native app on Android?

后端 未结 8 1003
故里飘歌
故里飘歌 2020-12-25 09:55

I\'ve made a timestamped versionName in build.gradle like 20150707.1125. I want to show the version of the package in react-native app in about window. How I could get vers

8条回答
  •  有刺的猬
    2020-12-25 10:09

    I used as reference the answer by @Marcos Demetrio

    But I was using expo, so I did this:

    import {expo} from '../../app.json'
    

    And in the Component:

              
    

    No package install needed.

提交回复
热议问题