[Build error #1] Error while building app

When trying to build the application, the simulator says “[Build error #1] Error while building app. More information may be available in the Simulator console”.
In console this information:
17:25:08.229 Unpacking plugins
17:25:08.229 Collecting plugin assets
17:25:08.229 Collecting plugin resources
17:25:08.229 Collecting plugin metadata
17:25:08.229 Output written to (C:\Windows\Temp\Corona Labs\CLtmpa14288\template\app\build/intermediates/plugins_metadata.json)
17:25:08.229 Creating AndroidManifest.xml
17:25:08.229 permissionName: android.permission.INTERNET
17:25:08.229 Opening: C:\Windows\Temp\Corona Labs\CLtmpa14288\template\app\build/intermediates/corona_manifest_gen/strings.xml
17:25:08.229 Opening: C:\Windows\Temp\Corona Labs\CLtmpa14288\template\app\build/intermediates/corona_manifest_gen/CopyToApk.txt
17:25:08.229 Collecting native libraries
17:25:08.229 Collecting legacy jar libraries
17:25:08.229 WARNING:: Using flatDir should be avoided because it doesn’t support any meta-data formats.
17:25:08.229 Build properties not found for package Android SDK Platform 32
17:25:08.229 Build-tool 30.0.2 is missing AAPT at C:\WINDOWS\Temp\Corona Labs\sdk\build-tools\30.0.2\aapt.exe
17:25:08.229 File C:\Users\ .android\repositories.cfg could not be loaded.
17:25:08.229
17:25:08.229 FAILURE: Build failed with an exception.
17:25:08.229
17:25:08.229 * What went wrong:
17:25:08.229 Could not determine the dependencies of task ‘:App:bundleReleaseResources’.
17:25:08.229 > Failed to find target with hash string ‘android-32’ in: C:\WINDOWS\Temp\Corona Labs\sdk
17:25:08.229
17:25:08.229 * Try:
17:25:08.229 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
17:25:08.229
17:25:08.229 * Get more help at https://help.gradle.org
17:25:08.229
17:25:08.229 BUILD FAILED in 9s
17:25:08.229 Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
17:25:09.616 Android build failed (1) after 13 seconds

Solar2D Simulator 2022.3685 (2022.12.21)
Windows 10 Pro

1 Like

I’m having the same problem as BlinkOut:

I’m updating one of my games for Google Play and here’s the error that occurs when I attempt to build for Android.

Program starting as '"/Applications/Corona-3706/Corona Simulator.app/Contents/MacOS/Corona Simulator" -no-console YES "/Volumes/2020/Dropbox/Projects/playBible/main.lua"'.
Program 'Corona Simulator' started in '/Volumes/2020/Dropbox/Projects/playBible' (pid: 26366).
2024-03-24 13:38:36.582 Corona Simulator[26366:3757472] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
WARNING: issue found in /Volumes/2020/Dropbox/Projects/playBible/build.settings: 
WARNING: unrecognized key: settings.osx.budleResourcesDirectory (string)
WARNING: unrecognized key: settings.osx.plist.UILaunchStoryboardName (string)
WARNING: unrecognized key: settings.iphone.plist.FirebaseAppDelegateProxyEnabled (boolean)
WARNING: deprecated key: settings.iphone.plist.UIAppFonts[] (string)
WARNING: unrecognized key: settings.orientation.content (string)
WARNING: unrecognized key: settings.window.resizeable (boolean)

Copyright (C) 2009-2024  C o r o n a   L a b s   I n c .
	Version: 3.0.0
	Build: 2024.3706
Loading project from:   /Volumes/2020/Dropbox/Projects/playBible
Project sandbox folder: ~/Library/Application Support/Corona Simulator/playBible-1836F83881459A27229FDC084BE563C7
Platform: 1290x2796 / x86_64 / 14.4.0 / Apple M1 Pro / 2.1 Metal - 88 / 2024.3706 / en-US | US | en_US | en
a221e3f4961739188cd5ccbde4c09e04`2.4159999999993`37
WARNING: Runtime:addEventListener: real ios devices don't generate 'key' events
WARNING: The 'plugin.facebook.v4a' library is not available in the Corona Simulator
WARNING: disabling the idle timer can reduce battery life on the device
auth_type:email
Using openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
OpenJDK 64-Bit Server VM (build 17.0.6+0-17.0.6b829.9-10027231, mixed mode)
Testing credentials for '/Volumes/2020/Dropbox/Projects/GoogleAppSigningWithKeystore - do not delete/playthebibleMadeByBhavin.keystore': 
jar signed.

Warning: 
The signer's certificate is self-signed.
The RSA signing key has a keysize of 1024 which is considered a security risk. This key size will be disabled in a future update.

The timestamp will expire on 2031-11-09.
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

Warning:
<playbible> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
<playbible> uses a 1024-bit RSA key which is considered a security risk. This key size will be disabled in a future update.
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
Using openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
OpenJDK 64-Bit Server VM (build 17.0.6+0-17.0.6b829.9-10027231, mixed mode)
ERROR: Could not create build.properties:
	Unable to find client entry for package 'com.coronalabs.playBible' in Google Service settings file 'google-services.json'. Please change application package name or disable useGoogleServicesJson in build.settings
Android build failed (1) after 1 seconds
ERROR: Build Failed: Error code: 1
WARNING: disabling the idle timer can reduce battery life on the device
Note: native.setProperty("androidSystemUiVisibility", value) does not work in the Simulator

How do environmental factors such as operating system, development environment, and dependencies influence the likelihood of encountering build errors?

the problem is really that there is no AI or method to help us find simple issues without a lot of work. Other than that, Solar2D is the best 2D engine by far