List of flaws with android mode build process and how to resolve them

Back at coding after a bit of a hiatus, I’d gotten a little burnt out, plus our university reduced its hours a whole lot because of coronavirus so I wasnt able to get online as much.

I have been trying to produce apps for android with consistency with processing, and have plagued by annoying bugs. I say annoying because there are solutions to them, but they are poorly documented and a google search yields little results.

I shall continue updating this list in the hopes that anyone with android related problems can hopefully find a method to load their code onto their device.

First things first, instructions on how to get things started.

Please note this is for a fresh install.

Location of important folders are as follows

C:\Users\user\.android
C:\Users\user\AppData\Local\Android

If these two locations exist delete them before attempting these instructions as these are the instructions for fresh installs.

Please note the ‘user’ will be you default user profile on windows. Therefore likely wont be called ‘user’.

Requirements Processing. This is based on Processing latest build 3.5.4, not currently attempted processing 4 beta.

_Download Android Studio
_ Load android studio. It should prompt you to download an android sdk. If at this stage you are not prompted then simply click configure at the start splash screen

Screen Shot 02-20-21 at 11.09 AM

if you are not presented with the following screen

------------add alternative here----------------

once this is complete go back to the sdk manager and download android 10 sdk 29 using android studio.
You should accept any thing which android studio asks, as this will be the sdk signature request, as this is required by processing.

Following this you should set up dev mode on your android device. To do this go to settings and scroll to about phone. Tap build number 7 times. You should now have unlocked developer mode on your device.


Go back to the main settings page and search dev. Developer options is found in under system and updates.

Here scroll down and set usb debugging. Hopefully your screen should look similar to this.

from here you should be able to simply load up a sketch and build to your phone using processing.

Please note all builds create an app on your device. 
This is used by processing in the future and for some reason 
deleting the app after a build on your phone may cause the
future builds of that sketch to fail with no error. Processing will report
a successful build and yet the app will be missing from the device.

-------------- solution to follow---------------

The fault above can only be solved by clearing the build location on the phone.

If any one knows where this is located please let me know, or message below, as I could not locate it and had to resort to a hard reset on my phone to remove the files

2 Likes

@paulgoux Good to see you participating again and thank you for your post. I have experienced similar difficulties setting up Android mode on a Mac. I don’t know if you plan to list other flaws in this thread or not, but I would like to add one that I recently noticed:

*Problem:*  If I copy the Processing folder from one Mac to another I am
 unable to run a sketch from this folder on the other system; error below. 
*Solution:* The only way around it seems to be to copy/paste the code into
 a new sketch on the second system and then it will run ok.

2 Likes

Yes I would very much like that. Ideally I would like a thread that someone can find through google search which would lead them to a comprehensive troubleshooting guide. As I do not have a mac I cannot help in this domain, but as I understand there’s quite the userbase on mac, and quite a few problems caused by recent hardware and software updates so this would be great too.

If you can just format the problem in your post so we understand at a glance what problem occurred, and whether or not there was a solution, and if so what the solution was.

@svan === this error has nothing to see with MAC; it s an android error, which can be solved uninstalling the previous version on the phone

  1. I never said it was due to the macOS.
  2. What’s the ‘previous version on the phone’?

@svan === ok, i have understood that it was a MAC related error; as for the previous version that is the version installed on the phone through the first computer.

I’ve experienced this error and I could only solve it by hard resetjng my phone. Where is the folder located on the phone so I can delete it without reseting the phone.

@akenaton I’m interested in tracking down a possible discrepancy in version numbers. How do I find out what version numbers were used by the two different computers?

@paulgoux

hi

activate android mode with out android studio

download it extract it in any path C or D etc…

run processing android mode chose where your path that extracted sdk folder then its done

1 Like

the most annoying bugs is that its hard to determine sdk version while downloading sdk using android studio

you can remove any app from here

1 Like