-
-
Save dayaki/0d7f6b2f0df291cff3dd8b307ccab241 to your computer and use it in GitHub Desktop.
react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res | |
cd android | |
./gradlew app:assembleDebug |
// Building APK
Build for Android
cd android
for debug:
./gradlew app:assembleDebug
for release:
./gradlew assembleRelease
// Android App Bundles
Generating the release APK:
cd android ./gradlew bundleRelease
Test the release build of your app:
react-native run-android --variant=release
Make SVG icon fill color changeable.
You can use react-native-svg-transformer to import svgs in to your code. Once you've set that up, you'll be able to do:
import ProfileIcon from './images/profile.svg'
You can then use ProfileIcon as a component.
To control the colour, edit the svg file and change the fill or stroke attributes to "currentColor" (so <polygon fill="currentColor" ...>). You can then set the color style on your svg element and it'll use that colour: <ProfileIcon style={{ color: '#f80' }}/>
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/