How to bundle images resources of React Native in Android?

前端 未结 1 894
说谎
说谎 2021-02-06 16:30

I use

react-native bundle --entry-file \"index.android.js\" --platform \"android\" --bundle-output \"./assets/index.android.bundle\" --verbose

相关标签:
1条回答
  • 2021-02-06 17:15

    I use the bundle command to bundle resources into android res/ folder:

        echo "START bundle for android normal resources release"
        react-native bundle \
        --platform android \
        --entry-file index.android.js \
        --bundle-output android/app/src/main/assets/index.android.bundle \
        --assets-dest  android/app/src/main/res/ \
        --dev false
    

    then build with gradlew:

    ./gradlew installRelease
    
    0 讨论(0)
提交回复
热议问题