I can't export my first Android program

I’m doing the following code in Processin 4, Android mode:

 void setup()  {
 void draw() {
         ellipse(mouseX, mouseY, mouseX-pmouseX, mouseY-pmouseY);

The code works, it runs on the Smartphone.
But I am not able to export to an .apk file
File → Export Signed Package
My AndroidManifest.xml:

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="android.test">
    <application android:icon="@mipmap/ic_launcher" android:label="">
        <activity android:exported="true" android:name=".MainActivity" android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen">
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>

And the error:

The sketch does not include all required app icons. Processing could use its default set of Android icons, which are okay to test the app on your device, but a bad idea to distribute it on the Play store. Create a full set of unique icons for your app, and copy them into the sketch folder. Once you have done that, try exporting the sketch again.

What folder should I put my icons in? Is the name correct? How should the manifest file look? I’m a beginner.
Below is the image of my icons.

Have you seen this: https://android.processing.org/tutorials/distributing/index.html

Icons may be placed in the sketch folder. No need to use ‘Icons’ folder. Try renaming icons to ‘icon-36.png’, etc if you still can’t get it to work.


Does not work. I think you have to make some changes to the line:

<application android:icon="@mipmap/ic_launcher" android:label="">

Try changing the names of the icons as previously suggested.


It worked! THANKS!
In the AndroidManifest.xml file put the name of your program.
Then you need icons in the root folder of the sketch with the names: icon-36.png, icon-48.png… up to icon-192.png in addition to the files preview_rectangular.png and preview_circular.png
With this the program can be exported to an .apk file.

1 Like