Having problem passing android build

I keep running into errors trying to build my project in ionic app flow, the android keeps failing.
app id

badge
Ionic ed140720

[02:11:36]: ▸ Build at: 2023-02-14T02:11:36.651Z - Hash: f5c5aa347eabcbc6 - Time: 81577ms
[02:11:36]: $ ionic info
[02:11:39]: ▸ Ionic:
[02:11:39]: ▸ Ionic CLI : 6.18.0 (/usr/local/nvm/versions/node/v16.13.2/lib/node_modules/@ionic/cli)
[02:11:39]: ▸ Ionic Framework : @ionic/angular 6.5.1
[02:11:39]: ▸ @angular-devkit/build-angular : 15.1.3
[02:11:39]: ▸ @angular-devkit/schematics : 15.1.3
[02:11:39]: ▸ @angular/cli : 15.1.3
[02:11:39]: ▸ @ionic/angular-toolkit : 6.1.0
[02:11:39]: ▸ Capacitor:
[02:11:39]: ▸ Capacitor CLI : 4.6.2
[02:11:39]: ▸ @capacitor/android : 4.6.2
[02:11:39]: ▸ @capacitor/core : 4.6.2
[02:11:39]: ▸ @capacitor/ios : 4.6.2
[02:11:39]: ▸ Utility:
[02:11:39]: ▸ cordova-res : not installed globally
[02:11:39]: ▸ native-run : 1.7.1
[02:11:39]: ▸ System:
[02:11:39]: ▸ NodeJS : v16.13.2 (/usr/local/nvm/versions/node/v16.13.2/bin/node)
[02:11:39]: ▸ npm : 9.4.2
[02:11:39]: ▸ OS : Linux 5.4
[02:11:39]: Generating app manifest…
[02:11:39]: $ ionic deploy manifest
[02:11:41]: ▸ [OK] Appflow Deploy manifest written to ./www/pro-manifest.json!
[02:11:41]: -----------------------------------------
[02:11:41]: — Step: get_cap_android_project_dir —
[02:11:41]: -----------------------------------------
[02:11:41]: ---------------------------
[02:11:41]: — Step: set_java_home —
[02:11:41]: ---------------------------
[02:11:41]: Try to detect the android gradle plugin version
[02:11:42]: Project Android Gradle Plug-in major version is 7: set Java to 11
[02:11:42]: ----------------------
[02:11:42]: — Step: cap_sync —
[02:11:42]: ----------------------
[02:11:42]: $ npx cap sync android
[02:11:44]: ▸ :heavy_check_mark: Copying web assets from www to android/app/src/main/assets/public in 676.17ms
[02:11:44]: ▸ :heavy_check_mark: Creating capacitor.config.json in android/app/src/main/assets in 954.28μs
[02:11:44]: ▸ :heavy_check_mark: copy android in 749.41ms
[02:11:44]: ▸ :heavy_check_mark: Updating Android plugins in 13.98ms
[02:11:44]: ▸ [info] Found 4 Capacitor plugins for android:
[02:11:44]: ▸ @capacitor/app@4.1.1
[02:11:44]: ▸ @capacitor/haptics@4.1.0
[02:11:44]: ▸ @capacitor/keyboard@4.1.1
[02:11:44]: ▸ @capacitor/status-bar@4.1.1
[02:11:44]: ▸ :heavy_check_mark: update android in 61.10ms
[02:11:44]: ▸ [info] Sync finished in 0.815s
[02:11:44]: -------------------------------
[02:11:44]: — Step: cap_custom_deploy —
[02:11:44]: -------------------------------
[02:11:44]: No custom native config detected.
[02:11:44]: Building android…
[02:11:44]: ----------------------------------
[02:11:44]: — Step: modify_gradle_config —
[02:11:44]: ----------------------------------
[02:11:44]: No custom native config found… skipping
[02:11:44]: -------------------------
[02:11:44]: — Step: bundledebug —
[02:11:44]: -------------------------
[02:11:45]: ▸ Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
[02:11:45]: ▸ Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
[02:11:45]: -------------------------
[02:11:45]: — Step: upload_logs —
[02:11:45]: -------------------------
±---------------------------±--------------------+
| Lane Context |
±---------------------------±--------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | android |
| LANE_NAME | android build_ionic |
| NODE_PACKAGE_MANAGER | npm |
| PROJECT_WEB_DIR | www |
| DOWNLOAD_CREDENTIAL_EXISTS | false |
| GRADLE_BUILD_TYPE | debug |
±---------------------------±--------------------+
[02:11:50]: Shell command exited with exit status 1 instead of 0.
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

/usr/local/bundle/bin/fastlane: \e[31m[!] Shell command exited with exit status 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
\e[0m
±-----±---------------------------------------±------------+
| fastlane summary |
±-----±---------------------------------------±------------+
| Step | Action | Time (in s) |
±-----±---------------------------------------±------------+
| 1 | add_extra_platforms | 0 |
| 2 | default_platform | 0 |
| 3 | build_summary | 1 |
| 4 | detect_native_type | 0 |
| 5 | Switch to android build_capacitor lane | 0 |
| 6 | detect_package_manager | 0 |
| 7 | add_git_credentials | 0 |
| 8 | get_appflow_config | 0 |
| 9 | dependency_install | 56 |
| 10 | create_capacitor_config | 0 |
| 11 | get_web_dir | 0 |
| 12 | modify_cap_web_config | 0 |
| 13 | download_credential | 0 |
| 14 | build_pro_app | 91 |
| 15 | get_cap_android_project_dir | 0 |
| 16 | set_java_home | 0 |
| 17 | cap_sync | 2 |
| 18 | cap_custom_deploy | 0 |
| 19 | modify_gradle_config | 0 |
| :boom: | bundledebug | 0 |
| 21 | upload_logs | 5 |
±-----±---------------------------------------±------------+

[02:11:50]: fastlane finished with errors
Running after script…
$ run “clean-up”
ERROR: Job failed: command terminated with exit code 1https://bitbucket.org/quaketechs/badge6/src/master/

Did you resolve this issue?

1 Like

Were you able to resolve this issue?

1 Like

Hi, I Run into this thread while searching for a solution to a similar problem.


my build of an android capacitor app made with ionic fails in the bundle debug step with this error:

[19:37:05]: fastlane finished with errors

[19:37:05]: Error accessing file, this might be due to fastlane’s directory handling
[19:37:05]: Check out Advanced - fastlane docs for more details

/usr/local/lib/ruby/3.2.0/open3.rb:222:in spawn': No such file or directory - /builds/RobertoPeralCastro/vestircolePos/android/gradlew (Errno::ENOENT) from /usr/local/lib/ruby/3.2.0/open3.rb:222:in popen_run’
from /usr/local/lib/ruby/3.2.0/open3.rb:210:in popen2e' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/helper/sh_helper.rb:54:in sh_control_output’
from /usr/local/lib/ruby/3.2.0/forwardable.rb:240:in sh' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/helper/gradle_helper.rb:32:in trigger’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/actions/gradle.rb:60:in run' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:229:in chdir' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:229:in execute_action’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing’
from android.Fastfile:161:in build_android_gradle' from android.Fastfile:32:in block (2 levels) in parsing_binding’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/lane.rb:33:in call' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:49:in block in execute’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:45:in chdir' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/runner.rb:45:in execute’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/commands_generator.rb:110:in block (2 levels) in run' from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:187:in call’
from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:157:in run' from /usr/local/bundle/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in run!' from /usr/local/bundle/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/commands_generator.rb:354:in run' from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/commands_generator.rb:43:in start’
from /usr/local/bundle/gems/fastlane-2.213.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in take_off' from /usr/local/bundle/gems/fastlane-2.213.0/bin/fastlane:23:in <top (required)>’
from /usr/local/bundle/bin/fastlane:25:in load' from /usr/local/bundle/bin/fastlane:25:in

Any help would be apreciated.
thanks

No not at all, I have not been able to export to android via appview for months now.
on several differet projects.