# Android compilation fails also with the new Processing version 4.5.6

**URL:** <https://discourse.processing.org/t/android-compilation-fails-also-with-the-new-processing-version-4-5-6/49021>\
**Category:** Processing for Android\
**Created:** [July 21, 2026, 9:20am UTC](https://discourse.processing.org/t/android-compilation-fails-also-with-the-new-processing-version-4-5-6/49021 "2026-07-21T09:20:50Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 23, 2026, 12:11am UTC](https://discourse.processing.org/t/android-compilation-fails-also-with-the-new-processing-version-4-5-6/49021/10 "2026-07-23T00:11:18Z")

</div>

Hello again @MPROCD,

End these tasks in Task Manager if it running:

- _OpenJDK Platform binary_
- _adb.exe_

The above may prevent renaming or deleting folders if in use.

Rename the _android folder_ in your _Processing Sketchbook folder_ so you can do a fresh SDK download to test this. You can delete later.

This [batch file](https://en.wikipedia.org/wiki/Batch_file) does a custom launch of Processing on my W10 PC in a local environment:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/b/1bfeb32f4d144f53032b9fe6147ed71b96fed210.png)

You will have to modify for your environment.

_It seems to work properly when it uses the JDK that comes with Processing!_

Console Output in Processing console:

> **BUILD SUCCESSFUL**
>
> ```auto
> Build folder: D:\temp\android16066578307641842714sketch
> WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33
> 
> This Android Gradle plugin (7.1.0) was tested up to compileSdk = 32
> 
> This warning can be suppressed by adding
> android.suppressUnsupportedCompileSdk=33
> to this project's gradle.properties
> 
> The build will continue, but you are strongly encouraged to update your project to
> use a newer Android Gradle Plugin that has been tested with compileSdk = 33
> This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
> Checking the license for package Android SDK Build-Tools 30.0.3 in D:\Users\GLV\Documents\Processing\android\sdk\licenses
> License for package Android SDK Build-Tools 30.0.3 accepted.
> Preparing "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)".
> "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" ready.
> Installing Android SDK Build-Tools 30.0.3 in D:\Users\GLV\Documents\Processing\android\sdk\build-tools\30.0.3
> "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" complete.
> "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" finished.
> Checking the license for package Android SDK Platform 33 in D:\Users\GLV\Documents\Processing\android\sdk\licenses
> License for package Android SDK Platform 33 accepted.
> Preparing "Install Android SDK Platform 33 (revision: 3)".
> "Install Android SDK Platform 33 (revision: 3)" ready.
> Installing Android SDK Platform 33 in D:\Users\GLV\Documents\Processing\android\sdk\platforms\android-33
> "Install Android SDK Platform 33 (revision: 3)" complete.
> "Install Android SDK Platform 33 (revision: 3)" finished.
> > Task :app:preBuild UP-TO-DATE
> > Task :app:preDebugBuild UP-TO-DATE
> > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> > Task :app:compileDebugAidl NO-SOURCE
> > Task :app:compileDebugRenderscript NO-SOURCE
> > Task :app:generateDebugBuildConfig
> > Task :app:javaPreCompileDebug
> > Task :app:generateDebugResValues
> > Task :app:generateDebugResources
> > Task :app:checkDebugAarMetadata
> > Task :app:createDebugCompatibleScreenManifests
> > Task :app:extractDeepLinksDebug
> > Task :app:processDebugMainManifest
> > Task :app:processDebugManifest
> > Task :app:mergeDebugShaders
> > Task :app:compileDebugShaders NO-SOURCE
> > Task :app:generateDebugAssets UP-TO-DATE
> > Task :app:mergeDebugAssets
> > Task :app:compressDebugAssets
> > Task :app:processDebugJavaRes NO-SOURCE
> > Task :app:mergeDebugResources
> > Task :app:checkDebugDuplicateClasses
> > Task :app:mergeDebugJavaResource
> > Task :app:mergeDebugJniLibFolders
> > Task :app:mergeDebugNativeLibs NO-SOURCE
> > Task :app:stripDebugDebugSymbols NO-SOURCE
> > Task :app:validateSigningDebug
> > Task :app:writeDebugAppMetadata
> > Task :app:writeDebugSigningConfigVersions
> > Task :app:processDebugManifestForPackage
> > Task :app:processDebugResources
> 
> > Task :app:compileDebugJavaWithJavac
> Annotation processing got disabled, since it requires a 1.6 compliant JVM
> 
> > Task :app:dexBuilderDebug
> > Task :app:desugarDebugFileDependencies
> > Task :app:mergeExtDexDebug
> > Task :app:mergeDexDebug
> > Task :app:packageDebug
> > Task :app:createDebugApkListingFileRedirect
> > Task :app:assembleDebug
> 
> Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
> 
> You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
> 
> See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
> 
> BUILD SUCCESSFUL in 1m 20s
> 27 actionable tasks: 27 executed
> 
> ```

Related:

> <https://github.com/processing/processing-android/issues/776>
>
> I cannot compile sketches in android mode, because my java-21 installation inter…feres with processing. The build process should use processing's java ('Wanted'), but is using my installation instead ("Actual').
> 
> \`\`\`
> org.gradle.tooling.GradleConnectionException: Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'.
> ...
> Caused by: org.gradle.launcher.daemon.client.DaemonConnectionException: The newly created daemon process has a different context than expected.
> It won't be possible to reconnect to this daemon. Context mismatch: 
> Java home is different.
> Wanted: DefaultDaemonContext\[uid=null,javaHome=/Applications/Processing.app/Contents/runtime/Contents/Home,daemonRegistryDir=/Users/tom/.gradle/daemon,pid=62920,idleTimeout=null,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=DE,-Duser.language=de,-Duser.variant\]
> Actual: DefaultDaemonContext\[uid=4478df6f-645a-4043-b5d8-1328302305ff,javaHome=/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home,daemonRegistryDir=/Users/tom/.gradle/daemon,pid=62966,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=DE,-Duser.language=de,-Duser.variant\]
> 
> \`\`\`

I also did some research on this here in previous versions:  
_[Android Programming for Beginners](https://discourse.processing.org/t/android-programming-for-beginners/46813)_  
In hindsight this may have been a workaround solution.

Once it is installed you will have to select it or update your _preferences.txt_ manually.

See issue:

> <https://github.com/processing/processing4/issues/1457>
>
> \### Most appropriate sub-area of Processing 4?
> 
> I'm not sure
> 
> \### Processing ver…sion
> 
> 4.5.2
> 
> \### Operating system
> 
> Linux
> 
> \### Bug description
> 
> Once you download the android SDK, you expect it to be saved, but it is not, every time I switch to android mode, it is once again asking me to download/select path.
> 
> \### Steps to reproduce this
> 
> 1. Switch to android mode
> 2. Download the SDK
> 3. Close the app and reopen it
> 4. switch to android mode
> 5. youll notice the path has not been persisted and youre tasked to redownload/direct to path.
> 
> 
> \### snippet
> 
> \`\`\`processing
> 
> // Paste your code below :)
> 
> void setup() {
> 
> }
> 
> void draw() {
> 
> }
> \`\`\`
> 
> 
> \### Additional context
> 
> https://github.com/user-attachments/assets/958a1fd4-352d-47c4-ad36-8db03129dc60
> 
> \### Would you like to work on the issue?
> 
> Nope, just reporting for now.

`:)`

---

_[View the full topic](https://discourse.processing.org/t/android-compilation-fails-also-with-the-new-processing-version-4-5-6/49021)._
