moodle app "Android"

moodle app "Android"

by يزن العجلوني -
Number of replies: 9
Unfortunately, I have been stuck for weeks. I followed the steps on the site several times and usually ended up with errors for which I could not find a solution through my research.

I want to share with you my current attempt and I may have Forgot something. In addition, if there is a tutorial or something similar that I can follow so that I can run the android moodle app and start modifying it,  please let me know.
* my environment information
i work on windows 10 .
i installed moodle app  "main branch" from "https://github.com/moodlehq/moodleapp".
i have already git installed , and i have already node.js and nvm installed from previous attempts i use node version 18.19.0  and npm 10.2.3.
also i have already native sdks for android platform installed from previous attempts.
then i try install production windows-build-tools  but It didn't work then i visit official npm for  windows-build-tools package  i found there message tell me "This package has been deprecated" and Node.js now includes build tools for Windows. You probably no longer need this tool
then when i try run bu "npm run dev:android"  doesn't work and got some errors  like :
1 - [0] 'NODE_ENV' is not recognized as an internal or external command,

'NODE_ENV' is not recognized as an internal or external command,

[0] operable program or batch file.

2 - [0] Failed to restore plugin "cordova-plugin-moodleapp". You might need to try adding it again. Error: Error: Command failed with exit code 1: C:\Users\user\Desktop\moodleapp-main\scrip


3 - [0] [ERROR] An error occurred while running subprocess cordova.

[0]         cordova.cmd platform add android --save exited with exit code 1.






Average of ratings: -
In reply to يزن العجلوني

Re: moodle app "Android"

by Daniel Villareal -
I've stuck also on creating new projects using the new release since last year and nobody help us.
Im not really sure if the documentation is outdated.
I followed it several times last year and this year and there's no luck.
In reply to يزن العجلوني

Re: moodle app "Android"

by Sanjaya Senanayaka -

same for me i am stuck at this same errorsErrorErrorerror

Attachment Annotation 2024-05-10 131328.png
In reply to Sanjaya Senanayaka

Odp: Re: moodle app "Android"

by Arkadiusz Malkowski -
Picture of Testers
I had the same problem, but the solution in this post helped me.
https://moodle.org/mod/forum/discuss.php?d=453748#p1854698

npx cordova platform remove android 
npx cordova plugin rm cordova-plugin-moodleapp
npx cordova plugin add cordova-plugin-moodleapp
npx cordova plugin rm cordova-plugin-network-information
npx cordova plugin add cordova-plugin-network-information
npm run prod:android
 
In reply to يزن العجلوني

Re: moodle app "Android"

by Khalid Jaber -
did you solve this problem?
In reply to Khalid Jaber

Re: moodle app "Android"

by Iglika Raykova -

Hello all! 

Did you solve this problem? With me the problem is bigger. For many plugins gives me such error i.e:

Failed to restore plugin "@moodlehq/cordova-plugin-advanced-http". You might need to try adding it again. Error: Error: Command failed with exit code 1: \scripts\cordova-hooks\before_plugin_add.sh

Same is for the following plugins:

@moodlehq/cordova-plugin-file-opener

@moodlehq/cordova-plugin-inappbrowser

@moodlehq/cordova-plugin-ionic-webview

@moodlehq/cordova-plugin-qrscanner

@moodlehq/cordova-plugin-zip

cordova-clipboard

cordova-plugin-badge

cordova-plugin-customurlscheme

cordova-plugin-geolocation

cordova-plugin-media-capture

cordova-plugin-network-information

cordova-plugin-screen-orientation

cordova-plugin-wkwebview-cookies

Is there any way that I can fix this?

Thanks in advance for the help!

In reply to Iglika Raykova

Re: moodle app "Android"

by Sanjaya Senanayaka -

Hello Guys Hope you’re doing well,

Idk what’s going on i researched so found out that moodle developers built there app on unix base systems like ubuntu or linux and you can’t use some old version of android os to test the app get the latest version as I found out hard way i had many wires errors that there is no answer on the internet thats solved after switching to linux hopefully this helps you 

In reply to Sanjaya Senanayaka

Re: moodle app "Android"

by Iglika Raykova -

Thanks for your reply Sanjaya!

Do you use Linux or any virtual machine under Windows? I enabled Windows Subsystem for Linux and tried to install Ubuntu and Kali Linux but without success. 

But the situation during the build has changed i.e now when a plugin has been discovered it shows: "Windows Subsystem for Linux has no installed distributions." 

So maybe once I succeed with installation of a Linux distribution I will succeed also with the build of the application. 

What do you exactly use for building the app? Can you please share with me?

Thanks again!

In reply to Iglika Raykova

Re: moodle app "Android"

by Sanjaya Senanayaka -

yes i tided using wsl but that won't help unless your wsl expert going to setup android home and tools variables is pain and using vm inside is so frustration i started dual boot into Linux mint  as i said in first replay use latest versions i used build tools 32 for latest version don't checkout main branch to