File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -186,21 +186,17 @@ jobs:
186186 uses : android-actions/setup-android@v3
187187 with :
188188 packages : tools platform-tools ndk;${{ env.NDK_VERSION }}
189- - name : Verify Android SDK setup
189+ - name : Remove legacy Android SDK tools
190190 run : |
191- echo "ANDROID_HOME: $ANDROID_HOME"
192- echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT"
193- echo "PATH: $PATH"
194- echo "Checking for legacy tools directory:"
195- ls -la "$ANDROID_HOME/tools/bin/" 2>/dev/null || echo "Legacy tools directory not found"
196- echo "Checking for cmdline-tools:"
197- ls -la "$ANDROID_HOME/cmdline-tools/" 2>/dev/null || echo "cmdline-tools directory not found"
198- echo "Checking which sdkmanager is in PATH:"
199- which sdkmanager || echo "sdkmanager not found in PATH"
200- echo "All sdkmanager instances found:"
201- find "$ANDROID_HOME" -name sdkmanager -type f 2>/dev/null || echo "No sdkmanager found"
202- echo "Java version:"
203- java -version
191+ # Remove legacy tools directory that contains Java 11+ incompatible sdkmanager
192+ # Gradle/RN build uses hardcoded paths to $ANDROID_HOME/tools/bin/sdkmanager
193+ # Must be done after setup-android sets ANDROID_HOME but before build starts
194+ if [ -d "$ANDROID_HOME/tools" ]; then
195+ echo "Removing legacy SDK tools directory (incompatible with Java 11+)"
196+ rm -rf "$ANDROID_HOME/tools"
197+ else
198+ echo "Legacy tools directory not found (already removed or never existed)"
199+ fi
204200 - run : rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
205201 - run : npm ci
206202 - run : npm run bootstrap
You can’t perform that action at this time.
0 commit comments