Setting up for App development

Is there a walk through on setting up Apps in wappler and any other software you need to install.
Every time I try and previews in emulator it t does not work.
I feel I must have not installed something on my Mac

I see you posted in And I thought a Mac might make mobile app development easier! so you probably went through the same steps I did. :slight_smile:

Is your issue similar to mine posted at Mobile App - Platform Selection Missing or is it different issue?

I have tried to get this working on 3 systems now, my mian development system Windows pro, Core i7 (may be close I think, certificate error so may indicate it is building and trying to run), a brand new core i7 windows pro lpatop and my mac mini.
Crashed and burned in each case

@gunnery
I covered what is required in my first two tutorials. I believe both Mac and Windows require the same tools, no difference there?

@Hyperbytes
Have you tried running in Android Studio and checking your debug logs?

2019-10-13_13-47-08

Make sure you have the latest version with all patches and updates applied as previous versions are very buggy. Version 3.5 is around where you need to be mateā€¦

From what I see, the only difference in mac install additionally alos needs Brew, otherwise it seems identical

Have you got a link to the tutorial ???

@gunnery, maybe this will help you. I was able to install all platforms, except for Windows this morning.

The software that I installed is listed in And I thought a Mac might make mobile app development easier!, which the exception of Xcode from the App Store because I already had it installed and updated.

Once you have your mobile project open in Wappler, you will need to open up the terminal console in Wappler and then click on the Platforms dropdown to add a platform to your project as described here, https://docs.wappler.io/t/apache-cordova-builder-add-or-remove-mobile-app-building-platforms/2842

Now I ran into some errors when I added the Android platform, so I decided to switch tracks and add the iOS platform first.

The error I got was 65 verbose stack Error: ios-deploy@1.9.4 preinstall: ./src/scripts/check_reqs.js && xcodebuild. Not knowing what that meant, I headed over to google to find out. I read a lot of different solutions, but none of them worked for me.

Until I found an obscure reference to something I had not tried. I opened up Terminal and ran the command: brew install ios-deploy. This provided some additional information on what the error actually was, which was that there was no directory named /user/local/Cellar and it could not be created as part of the installation process.

So, me not being familiar with Mac command line commands, I went back to google and found the command was: sudo chown -R $(whoami) /user/local/Cellar.

After that, I re-ran the brew install ios-deploy command and it appeared to install successfully. Not being satisfied, I ran the command: brew doctor to see if there were any additional issues I might need to fix. The results said that I needed to create another directory and add permissions for it, but unlike any of the past errors, it actually told me how to do it!

sudo mkdir -p /usr/local/sbin
sudo chown -R $(whoami) /usr/local/sbin

I then switched over to Wappler and added the iOS platform to the mobile project.

38%20AM

Then I added the OS platform.

55%20AM

Then I added the Android platform.

55%20AM

Then I added the browser platform.

28%20AM

Then I added the electron platform.

03%20AM

Which means that the Windows platform is all that is remaining and I am waiting on advice on that.

It seems all of my errors resulted from that one error message.

Hi @Scott got the IOS workingā€¦finally.
However still getting problems with android.
The Error Iā€™m getting is:
Adding android to your Cordova Site ā€¦
Using cordova-fetch for cordova-android@^8.0.0
Adding android projectā€¦
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.1.0
Installing ā€œcordova-plugin-whitelistā€ for android
android added successfully!
exec: cordova run --release --nobuild --device android

Run your Cordova Project for android ā€¦
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/Users/peterheggielaptop/Library/Android/sdk (recommended setting)
ANDROID_HOME=/Users/peterheggielaptop/Library/Android/sdk (DEPRECATED)
Requirements check failed for JDK 8 (ā€˜1.8.*ā€™)! Detected version: 13
Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.
Error running your Cordova Project for android!

Any ideas??

Yes, thats the same issue I ran into on my Mac

Basically there are two versions of Java out there

Java SE 13 which is commonly installed as a runtime

and

Java 8.1 SDK which Cordoova needs

I mistakenly added Java 13 to the mac. After doing so I realised and then added sdk 8.1 but internally paths seem still to reference the old Java SE 13

I can uninstall Java SBK 8.1 with the usual drag to trash BUT i cannot find any reference top or any way to remove Java SE 13 as it is not visible anywhere

So I guess finding the solution to that will help us both with the same problem, either removing it or changing paths to sdk 8.1 (tried lots of online suggestions, non worked)

Need to solve: Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.

Have you tried this? https://www.java.com/en/download/help/mac_uninstall_java.xml

Think I have done that one before but tried again

java -version still reports version 13 and javac -version version 13

Finally got java 13 removed.

I was able to check for which versions of java were installed with

ls /Library/Java/JavaVirtualMachines/

This responded with Java 13 and java 1.8

I was then able to remove java 13 with

sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-13.jdk

So now version 1.8.0.221 is correctly reported

Still getting a path error, got to find correct path now

Java path set at last by:

export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.8.0_221.jdk/Contents/Home
export PATH=/System/Library/Java/JavaVirtualMachines/1.8.0_221.jdk/Contents/Home/bin:$PATH
2 Likes