Skip to content

Commit 8f795d3

Browse files
Add README section describing Android release build fix (#218)
* Add README section describing Android release build fix * Move the duplicate lib fix description to an inline comment. * Keep only org.videolan.libvlc libs in recommended proguard-rules * Comment in plain English
1 parent 76272a8 commit 8f795d3

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,34 @@ After that you can access the media/subtitle file by
7575

7676
<hr>
7777

78+
#### Android build configuration
79+
80+
1. In `android/app/build.gradle`:
81+
```groovy
82+
android {
83+
packagingOptions {
84+
// Fixes duplicate libraries build issue,
85+
// when your project uses more than one plugin that depend on C++ libs.
86+
pickFirst 'lib/**/libc++_shared.so'
87+
}
88+
89+
buildTypes {
90+
release {
91+
minifyEnabled true
92+
useProguard true
93+
proguardFiles getDefaultProguardFile(
94+
'proguard-android-optimize.txt'),
95+
'proguard-rules.pro'
96+
}
97+
}
98+
}
99+
```
100+
101+
2. Create `android/app/proguard-rules.pro`, add the following lines:
102+
```proguard
103+
-keep class org.videolan.libvlc.** { *; }
104+
```
105+
78106
## Quick Start
79107
To start using the plugin, copy this code or follow the example project in 'flutter_vlc_player/example'
80108

0 commit comments

Comments
 (0)