Skip to content

[BUG]: Android Studio Bazel import fails on Windows when oppia-android.bazelproject has CRLF line endings; converting to LF fixes the wizard stall #5992

@ShankhanilSaha

Description

@ShankhanilSaha

Describe the bug

Importing Oppia Android as a Bazel project in Android Studio on Windows fails when the project view file oppia-android.bazelproject uses CRLF line endings, causing the wizard to either reject the path with “Cannot Use Project View File” and force “Copy external,” or to stall when clicking Next without proceeding. Converting the .bazelproject file’s line endings from CRLF to LF allows the import to succeed immediately. This behavior appears related to the Bazel plugin’s parsing of .bazelproject files, which are line-structured and sensitive to formatting.

Steps To Reproduce

On Windows 11, clone oppia/oppia-android and ensure oppia-android.bazelproject has CRLF line endings.

Open Android Studio (e.g., Narwhal 2025.1.3), then File > Import Bazel Project.

Select oppia-android.bazelproject located in the workspace; observe the “Cannot Use Project View File… use ‘Copy external’” prompt or that the Next button does nothing and the wizard stalls.

Cancel, convert oppia-android.bazelproject line endings to LF in an editor, and retry the import; the wizard proceeds and the project imports successfully.

Expected Behavior

The Bazel import wizard should accept a valid .bazelproject file within the workspace and proceed when clicking Next regardless of the file’s native Windows line endings, or documentation should clearly instruct using LF line endings for the .bazelproject to prevent stalls.

Screenshots/Videos

Image Image

What device/emulator are you using?

Pixel 9

Which Android version is your device/emulator running?

Android Studio Narwhal 4 Feature Drop | 2025.1.4

Which version of the Oppia Android app are you using?

No response

Additional Context

No response

Metadata

Metadata

Labels

Impact: MediumModerate perceived user impact (non-blocking bugs and general improvements).Work: LowSolution is clear and broken into good-first-issue-sized chunks.bugEnd user-perceivable behaviors which are not desirable.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions