# Ionic android-targetsdk version 29 issue with plugins

**URL:** <https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634>\
**Category:** Ionic Framework\
**Created:** [November 15, 2020, 7:55am UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634 "2020-11-15T07:55:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![RajeshReddy](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RajeshReddy](https://forum.ionicframework.com/u/RajeshReddy)\
**Post date:** [November 15, 2020, 7:55am UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/1 "2020-11-15T07:55:43Z")

</div>

When i was trying to build with targetsdk version 29.

some of the plugins are not working on android 10 devices.

Photo Library and Image Picker are not working with Android SDK 29.

from November 1st onwards google play is not accepting android-targetSdkVersion=28

so I need to use 29 which is making an issue with plugins can anyone has a solution for this.

and I want ionic to fix these problems with plugins. which is very bad when we are updating the app for new API levels

---

<div class="post-metadata">

**Author:** ![RajeshReddy](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RajeshReddy](https://forum.ionicframework.com/u/RajeshReddy)\
**Post date:** [November 15, 2020, 7:58am UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/2 "2020-11-15T07:58:55Z")

</div>

@mhartington plesae look into this issue i have seen you are active.

---

<div class="post-metadata">

**Author:** ![indraraj26](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/indraraj26/32/131213_2.png) [@indraraj26](https://forum.ionicframework.com/u/indraraj26)\
**Post date:** [November 15, 2020, 12:23pm UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/3 "2020-11-15T12:23:03Z")

</div>

ImagePicker solution for Android 10: [https://github.com/Telerik-Verified-Plugins/ImagePicker/issues/208](https://github.com/Telerik-Verified-Plugins/ImagePicker/issues/208)

Also this is been added on latest version update the ImagePicker plugin

For photo library what errors are you getting ?

---

<div class="post-metadata">

**Author:** ![RajeshReddy](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RajeshReddy](https://forum.ionicframework.com/u/RajeshReddy)\
**Post date:** [November 15, 2020, 3:41pm UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/4 "2020-11-15T15:41:49Z")

</div>

yes, i have added this, but it is not working ionic 3 cordova 8.1.1

do you have solution for that…

Thank you

---

<div class="post-metadata">

**Author:** ![indraraj26](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/indraraj26/32/131213_2.png) [@indraraj26](https://forum.ionicframework.com/u/indraraj26)\
**Post date:** [November 15, 2020, 7:07pm UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/5 "2020-11-15T19:07:19Z")

</div>

create an github repo with minimal code to reproduce for ImagePicker

---

<div class="post-metadata">

**Author:** ![RajeshReddy](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@RajeshReddy](https://forum.ionicframework.com/u/RajeshReddy)\
**Post date:** [December 1, 2020, 2:01pm UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/6 "2020-12-01T14:01:42Z")

</div>

just intall the image picker in a fresh ionic 5 project…and build release apk with targetsdk version 29

for the first time iam feeling pitty ,sad and anger for choosing ionic for the app development with lot of unsupported plugins it makes developer and client relationship goes bad.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [December 1, 2020, 2:37pm UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/7 "2020-12-01T14:37:11Z")

</div>

@RajeshReddy Please provide a sample repo that we can look at. This will reduce an potential errors that could appear if we try to recreate the issue.

---

<div class="post-metadata">

**Author:** ![prabhashi1](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/prabhashi1/32/133655_2.png) [@prabhashi1](https://forum.ionicframework.com/u/prabhashi1)\
**Post date:** [March 27, 2021, 5:05am UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/8 "2021-03-27T05:05:13Z")

</div>

I had the same issue with base64togallery plugin. So I finally managed to solved it.

To anyone who is struggling, I will explain as below.

As mentioned in the git, [GitHub - Nexxa/cordova-base64-to-gallery: this project is not longer maintained - Cordova plugin to save base64 data as a png image into the device](https://github.com/Nexxa/cordova-base64-to-gallery) , ionic Cordova base64togallery plugin has been discontinued.

And also when trying to submit the ionic mobile app for Android production, it’s saying that the target SDK version should be more than 29.

But as usual, if we add `<preference name="android-targetSdkVersion" value="29" />` to the config.xml file under the Android platform, **it will not work the base64togallery plugin** (not saving images to your device)

So you have to do like below,

In your ionic project, go to `build.gradle` file ( `platforms\android\build.gradle` ) and change **defaultTargetSdkVersion** and **defaultCompileSdkVersion** to 29. (as below)

```auto
defaultTargetSdkVersion=29 
defaultCompileSdkVersion=29

```

And then go to `AndroidManifest.xml` file ( `platforms\android\app\src\main\AndroidManifest.xml` ) and add `android:requestLegacyExternalStorage="true"` to the application tag, as showing below.

```auto
<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:networkSecurityConfig="@xml/network_security_config" android:requestLegacyExternalStorage="true" android:supportsRtl="true">

```

Then try to build your app for debug or release versions.

---

<div class="post-metadata">

**Author:** ![suitsmeonline](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/suitsmeonline/32/136996_2.png) [@suitsmeonline](https://forum.ionicframework.com/u/suitsmeonline)\
**Post date:** [March 27, 2021, 11:17am UTC](https://forum.ionicframework.com/t/ionic-android-targetsdk-version-29-issue-with-plugins/199634/9 "2021-03-27T11:17:03Z")

</div>

For photo library what errors are you getting ?

www . suitsmeonline . com
