diff --git a/scripts/build-android.sh b/scripts/build-android.sh index 53ada97e..0f139be1 100755 --- a/scripts/build-android.sh +++ b/scripts/build-android.sh @@ -256,7 +256,7 @@ fi # Step 1: Check and fix Android resources safe_execute "Checking Android resources" "$(dirname "$0")/check-android-resources.sh" || { - log_warning "Resource check found issues, but continuing with build..." + log_warn "Resource check found issues, but continuing with build..." } # Step 2: Clean Android app diff --git a/scripts/generate-android-icons.sh b/scripts/generate-android-icons.sh index 432f2428..b2279a98 100755 --- a/scripts/generate-android-icons.sh +++ b/scripts/generate-android-icons.sh @@ -35,6 +35,7 @@ mkdir -p "$ANDROID_RES_DIR/mipmap-mdpi" mkdir -p "$ANDROID_RES_DIR/mipmap-xhdpi" mkdir -p "$ANDROID_RES_DIR/mipmap-xxhdpi" mkdir -p "$ANDROID_RES_DIR/mipmap-xxxhdpi" +mkdir -p "$ANDROID_RES_DIR/mipmap-anydpi-v26" echo "[INFO] Generating launcher icons..." @@ -53,44 +54,32 @@ convert "$ASSETS_DIR/icon.png" -resize 96x96 "$ANDROID_RES_DIR/mipmap-xhdpi/ic_l convert "$ASSETS_DIR/icon.png" -resize 144x144 "$ANDROID_RES_DIR/mipmap-xxhdpi/ic_launcher_round.png" convert "$ASSETS_DIR/icon.png" -resize 192x192 "$ANDROID_RES_DIR/mipmap-xxxhdpi/ic_launcher_round.png" -# Create background and foreground mipmap files -# These reference the existing drawable files -cat > "$ANDROID_RES_DIR/mipmap-anydpi-v26/ic_launcher_background.xml" << 'EOF' - - - - -EOF - -cat > "$ANDROID_RES_DIR/mipmap-anydpi-v26/ic_launcher_foreground.xml" << 'EOF' - - - - -EOF - -# Update the existing launcher XML files to reference the correct resources +# Create simple launcher XML files (no adaptive icons for now) cat > "$ANDROID_RES_DIR/mipmap-anydpi-v26/ic_launcher.xml" << 'EOF' - - + + EOF cat > "$ANDROID_RES_DIR/mipmap-anydpi-v26/ic_launcher_round.xml" << 'EOF' - - + + EOF +# Create foreground mipmap files for adaptive icons +convert "$ASSETS_DIR/icon.png" -resize 108x108 "$ANDROID_RES_DIR/mipmap-anydpi-v26/ic_launcher_foreground.png" + echo "[SUCCESS] Generated Android launcher icons:" echo " - mipmap-mdpi/ic_launcher.png (48x48)" echo " - mipmap-hdpi/ic_launcher.png (72x72)" echo " - mipmap-xhdpi/ic_launcher.png (96x96)" echo " - mipmap-xxhdpi/ic_launcher.png (144x144)" echo " - mipmap-xxxhdpi/ic_launcher.png (192x192)" +echo " - mipmap-anydpi-v26/ic_launcher_foreground.png (108x108)" echo " - Updated mipmap-anydpi-v26 XML files" echo "[SUCCESS] Android icon generation completed successfully!" \ No newline at end of file