# Having problem passing android build

**URL:** <https://forum.ionicframework.com/t/having-problem-passing-android-build/231077>\
**Category:** Ionic Framework\
**Created:** [February 14, 2023, 2:18am UTC](https://forum.ionicframework.com/t/having-problem-passing-android-build/231077 "2023-02-14T02:18:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JCottrellIII](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcottrelliii/32/125968_2.png) [@JCottrellIII](https://forum.ionicframework.com/u/JCottrellIII)\
**Post date:** [February 14, 2023, 2:18am UTC](https://forum.ionicframework.com/t/having-problem-passing-android-build/231077/1 "2023-02-14T02:18:28Z")

</div>

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]: ▸ ✔ Copying web assets from www to android/app/src/main/assets/public in 676.17ms  
[02:11:44]: ▸ ✔ Creating capacitor.config.json in android/app/src/main/assets in 954.28μs  
[02:11:44]: ▸ ✔ copy android in 749.41ms  
[02:11:44]: ▸ ✔ 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]: ▸ ✔ 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 |  
| 💥 | 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 1[https://bitbucket.org/quaketechs/badge6/src/master/](https://bitbucket.org/quaketechs/badge6/src/master/)

---

<div class="post-metadata">

**Author:** ![bryantjamestech](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bryantjamestech/32/144812_2.png) [@bryantjamestech](https://forum.ionicframework.com/u/bryantjamestech)\
**Post date:** [July 14, 2023, 10:43pm UTC](https://forum.ionicframework.com/t/having-problem-passing-android-build/231077/2 "2023-07-14T22:43:30Z")

</div>

Did you resolve this issue?

---

<div class="post-metadata">

**Author:** ![ctupe](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ctupe/32/114034_2.png) [@ctupe](https://forum.ionicframework.com/u/ctupe)\
**Post date:** [January 12, 2024, 5:28am UTC](https://forum.ionicframework.com/t/having-problem-passing-android-build/231077/3 "2024-01-12T05:28:11Z")

</div>

Were you able to resolve this issue?

---

<div class="post-metadata">

**Author:** ![RobertoPeralCastro](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@RobertoPeralCastro](https://forum.ionicframework.com/u/RobertoPeralCastro)\
**Post date:** [February 11, 2024, 7:42pm UTC](https://forum.ionicframework.com/t/having-problem-passing-android-build/231077/4 "2024-02-11T19:42:11Z")

</div>

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

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/d/e/debd873bae8e26e9a0d32575741a4da69254b14a.png)  
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](https://docs.fastlane.tools/advanced/#directory-behavior) 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

---

<div class="post-metadata">

**Author:** ![JCottrellIII](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcottrelliii/32/125968_2.png) [@JCottrellIII](https://forum.ionicframework.com/u/JCottrellIII)\
**Post date:** [February 11, 2024, 10:36pm UTC](https://forum.ionicframework.com/t/having-problem-passing-android-build/231077/5 "2024-02-11T22:36:28Z")

</div>

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