# How to adjust the API level when exporting signed package for Android?

**URL:** <https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286>\
**Category:** Processing for Android\
**Created:** [August 16, 2020, 8:38am UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286 "2020-08-16T08:38:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mowtine](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mowtine/32/10274_2.png) [@Mowtine](https://discourse.processing.org/u/Mowtine)\
**Post date:** [August 16, 2020, 8:38am UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286/1 "2020-08-16T08:38:01Z")

</div>

I am trying to add my first app to the google app store and when uploading the signed\_aligned APK I get the following error:  
Your app currently targets API level 28 and must target at least API level 29 to ensure it is built on the latest APIs optimized for security and performance. Change your app’s target API level to at least 29.

Looking around, it seems there was a similar post about level 26 -\> 28 and the responder seemed to suggest signing it with android studio. Is there a way to change the package to 29 through processing? If not why isn’t this implemented and what would you recommend I use?

- Just in case I need to mention, adjusting the android:targetSdkVersion value gets re-set when exporting.

Thanks.

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [August 16, 2020, 8:52am UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286/2 "2020-08-16T08:52:43Z")

</div>

@Mowtine ===

P5 uses a template when generating the Manifest: you cannot change the API to 29. If you need to change it you have to use Android Studio && gradle.

---

<div class="post-metadata">

**Author:** ![Mowtine](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mowtine/32/10274_2.png) [@Mowtine](https://discourse.processing.org/u/Mowtine)\
**Post date:** [August 16, 2020, 8:58am UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286/3 "2020-08-16T08:58:03Z")

</div>

Would you mind linking me a tutorial/guide for that? can a processing sketch just be run in android studio?

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [August 16, 2020, 9:03am UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286/4 "2020-08-16T09:03:35Z")

</div>

@Mowtine === you download and install AS; from P5 you export your sketch: it creates a folder where are your files; from AS you “import from existing code” and point towards the folder created by P5; then you can change the API from 28 to 29 using the build from gradle. At the end you create your release with AS and everything is ok.

---

<div class="post-metadata">

**Author:** ![Mowtine](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mowtine/32/10274_2.png) [@Mowtine](https://discourse.processing.org/u/Mowtine)\
**Post date:** [August 21, 2020, 2:03am UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286/5 "2020-08-21T02:03:07Z")

</div>

Great, is there any benefit to using API’s more recent than 29?

---

<div class="post-metadata">

**Author:** ![Mowtine](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mowtine/32/10274_2.png) [@Mowtine](https://discourse.processing.org/u/Mowtine)\
**Post date:** [August 21, 2020, 2:31am UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286/6 "2020-08-21T02:31:38Z")

</div>

Alright, ran into a problem doing that and the solutions I found don’t seem to be working:

After importing the app folder from the exported sketch from Processing I get the following error:  
Unable to find method ‘org.gradle.api.internal.TaskInputsInternal.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;’.

Looking it up it seems that some people got this issue because of the gradle version, changing that in my gradle-wrapper.properties does not change the issue when I try to sync again.

Any ideas?

---

<div class="post-metadata">

**Author:** ![HackinHarry](https://avatars.discourse-cdn.com/v4/letter/h/3e96dc/32.png) [@HackinHarry](https://discourse.processing.org/u/HackinHarry)\
**Post date:** [August 22, 2020, 2:47pm UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286/7 "2020-08-22T14:47:41Z")

</div>

I just opened a project in AS to see if I can help you. I selected the android view instead of project or project files view. This gives you the app and gradle scripts. When I look at gradle-wrapper.properties it shows which gradle version for the line giving a download URL. This isnt the same as the version you will use for your app. If I look at the build.gradle for the Module: app, that’s where the SDK version is set. There is another build.gradle and that’s for the Project: yourprojectname, that sets the gradle version that your project needs.

Try this, start a new project in AS and when you set it up with the wizard, set your target and compile and minimum SDK the way you want and then examine all the gradle script files and look for the differences with your current project.
