MxBuild failing to create build

Hi All I’m running MxBuild command in command prompt but its getting failed and unable to create package. Any suggestions on how to resolve the issue and create .apk file for native mobile to deploy
1 answers

Hello Anvitha,  (edit: sorry, just noticed that you’ve posted a comment to my reply in the other forum post)


It’s hard to recommend a suggestion based on the given image.

As you have noticed, the error message says that the access to the file ...\911.11.40456\modeler\DotNetZip-nsv3xp3g.tmp is denied. I’ve tried to run the MxBuild command myself and this tmp file (or simmilar) was not created… weird...


The procedure I usually do to generate APKs is as follows.

  1. generate the bundle:
C:\Programs\Mendix\{MxVersion}\modeler\mxbuild.exe --java-home="C:\Program Files\AdoptOpenJDK\jdk-" --java-exe-path="C:\Program Files\AdoptOpenJDK\jdk-\bin\java.exe" --target=deploy --native-packager --loose-version-check {MprProject}
  1. copy the bundle to the Native Template folder (powershell)
Copy-Item -Path "{your project folder}\deployment\native\bundle\android\*" -Destination "{your template folder}\android\app\src\main\" -Recurse -Force


  1. run the required node commands in the root of Native Template folder:
npm install
npm run configure


  1. run the command to generate the APK (powershell):
Set-Location {your template folder}\android\
.\gradlew.bat assembleAppstoreDebug


At the end of this procedure, you’ll have an unsigned APK debug in the folder:

{your template folder}\android\app\build\outputs\apk\appstore\debug