From b2cec2aba4aa003c45d3eb476084a03ca6597649 Mon Sep 17 00:00:00 2001 From: VB Date: Sun, 12 Oct 2025 15:35:22 +0200 Subject: [PATCH 1/2] Windows installation tips and fixes --- .../mobile/1/getting-started/environment-setup.md | 11 +++++++++-- .../docs/mobile/1/getting-started/installation.md | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/views/docs/mobile/1/getting-started/environment-setup.md b/resources/views/docs/mobile/1/getting-started/environment-setup.md index 83483f1a..a0d6c83d 100644 --- a/resources/views/docs/mobile/1/getting-started/environment-setup.md +++ b/resources/views/docs/mobile/1/getting-started/environment-setup.md @@ -74,8 +74,9 @@ to develop and test your apps on a Simulator. However, you will need to enroll w #### Note -You do not need to separately install the Java Development Kit (JDK). Android Studio will automatically install the -proper JDK for you. +You might need to install the Java Development Kit (JDK) separately. Recent versions of Android Studio no longer install it automatically. +If you encounter Gradle errors, check the [Gradle JDK Compatibility Matrix](https://docs.gradle.org/current/userguide/compatibility.html). +The latest JDK version may not be supported yet. @@ -110,6 +111,8 @@ export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$AND ``` #### On Windows +The example below assumes default installation paths for the Android SDK and JDK: + ```shell set ANDROID_HOME=C:\Users\yourname\AppData\Local\Android\Sdk set PATH=%PATH%;%JAVA_HOME%\bin;%ANDROID_HOME%\platform-tools @@ -118,6 +121,10 @@ set PATH=%PATH%;%JAVA_HOME%\bin;%ANDROID_HOME%\platform-tools set JAVA_HOME=C:\Program Files\Microsoft\jdk-17.0.8.7-hotspot ``` +### "No AVDs found" error +If you encounter this error, it means no Virtual Devices are configured in Android Studio. +To resolve it, open Android Studio, navigate to Virtual Devices, and create at least one device. + ## Testing on Real Devices You don't _need_ a physical iOS/Android device to compile and test your application, as NativePHP for Mobile supports diff --git a/resources/views/docs/mobile/1/getting-started/installation.md b/resources/views/docs/mobile/1/getting-started/installation.md index 3c8b847f..d496acfe 100644 --- a/resources/views/docs/mobile/1/getting-started/installation.md +++ b/resources/views/docs/mobile/1/getting-started/installation.md @@ -56,7 +56,7 @@ If you experience a cURL error when running this command, make sure you are runn #### Windows Performance Tip -Add `C:\temp` to your Windows Defender exclusions list to significantly speed up Composer +Add `C:\temp` as well as the project folder to your Windows Defender exclusions list to significantly speed up Composer installs during app compilation. This prevents its real-time scanning from processing the many temporary files created during the build process, which slows the process considerably. From 910b44f88d58f5d13132a68bbb0c27ab6a95b98c Mon Sep 17 00:00:00 2001 From: VB Date: Sun, 12 Oct 2025 15:39:16 +0200 Subject: [PATCH 2/2] Gradle version tip --- .../views/docs/mobile/1/getting-started/environment-setup.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/docs/mobile/1/getting-started/environment-setup.md b/resources/views/docs/mobile/1/getting-started/environment-setup.md index a0d6c83d..dce96acb 100644 --- a/resources/views/docs/mobile/1/getting-started/environment-setup.md +++ b/resources/views/docs/mobile/1/getting-started/environment-setup.md @@ -78,6 +78,8 @@ You might need to install the Java Development Kit (JDK) separately. Recent vers If you encounter Gradle errors, check the [Gradle JDK Compatibility Matrix](https://docs.gradle.org/current/userguide/compatibility.html). The latest JDK version may not be supported yet. +To check the installed Gradle version, examine the ``nativephp/android/.gradle`` folder after running ``php artisan native:install``. + ### Setting up Android Studio and SDK