Skip to content

Commit 6cd170a

Browse files
committed
Fix fileprovider build with androidx
When androidx is enabled, the android support library is no longer available. The library artifact needs to be replaced as well as changing code to use the `FileProvider` class from `androidx.core.content` instead of `android.support.v4.content`.
1 parent ac17450 commit 6cd170a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ dependencies {
130130
{% if args.presplash_lottie %}
131131
implementation 'com.airbnb.android:lottie:3.4.0'
132132
{%- endif %}
133+
{% if args.fileprovider_paths %}
134+
{%- if args.enable_androidx -%}
135+
implementation 'androidx.core:core:1.8.0'
136+
{%- else -%}
133137
implementation 'com.android.support:support-v4:26.1.0'
138+
{%- endif -%}
139+
{% endif %}
134140
}
135141

0 commit comments

Comments
 (0)