Unable to run code from my Processing window on my Android device

Hello!

I am very new to Processing for Android, and I am actually having problems even running my first test sketch on my Physical device. Just to clear some things up, I am using a OnePlus 9 Pro device, with USB debugging turned on in developer settings. The device is showing up in the Android → Devices tab in processing, and my device has registered the computer (A surface laptop 4 running windows 11) attempting to use the USB debugging. I have allowed it to do so on the phone.

I have installed the Android mode for Processing version 3.5.4, and let processing auto-install the android SDK when it asked if it was allowed to. This was done successfully.

The Error I am getting happens when I attempt to run code from the editor on the phone. I get a little error with the text “Build Failed.” and a whole load of red errors in the output. The first lines of the error look as follows:

"FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.

Failed to install the following SDK components:
build-tools;29.0.2 Android SDK Build-Tools 29.0.2
Install the missing components using the SDK manager in Android Studio."

Looking at the error I attempted to do what it told me to (Installing Build Tools 29.0.2 in android Studio using the SDK manager.) and after a system restart, I still seem to get the same error.

Any help here would be greatly appreciated. As mentioned earlier I am very new at both processing and android app-related topics, but I will try my best to give any info I may be asked about.

You might want to try Processing version 4.0.1 to see if you have the same problem. On a Mac the Build Tools are in Library/Android/sdk/build-tools folder. Others will know more about Windows operating system.

You might be missing the SDK at the location which is being used by the sketch, to confirm the SDK location being used, you can export the sketch from File-> Export Android Project and then check the local.properties file in the exported project location.
I would recommend using the newer versions of Processing 4 and Android Mode.

Thanks,
Rupesh

Hello! TobiS137,
I am also starting to processing for android but recently my PC got crashed. Now i need a laptop for doing this. can you suggest me a laptop for me? I want to buy the HP Victus Gaming laptop this variant https://computermania.com.bd/product/hp-victus-15-price-in-bd/
is this variant could make the work? can you help me please?

Hi
The laptop you provide at the link very suitable for processing android