Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio resets project name on Gradle reload #1209

Closed
3 tasks done
ath0mas opened this issue Apr 16, 2021 · 0 comments · Fixed by #1214
Closed
3 tasks done

Android Studio resets project name on Gradle reload #1209

ath0mas opened this issue Apr 16, 2021 · 0 comments · Fixed by #1214
Labels

Comments

@ath0mas
Copy link
Contributor

ath0mas commented Apr 16, 2021

Bug Report

Problem

What is expected to happen?

Since v9.1.0 and #1173, the app name is pushed as project name for IntelliJ IDEA / Android Studio, and is supposed to persist.

What does actually happen?

As soon as a Gradle reload is done the project name is automaticaly reset back to android instead of the app name ; the .name file inside .idea/ is deleted by IntelliJ IDEA (same for Android Studio?).
Such reload is done on first project open, sync, with manual "Reload Gradle Project" action, or "Reload All Gradle Projects" button.

Information

Changing project name in Android Studio may have different meanings and solutions (see this so for example).
For Cordova Android it is clear that the project directory inside /platforms has to stay as it is, android, and changing project name is only for the IDE title and "Open Recent" list.

I tried a suggested solution adding rootProject.name = "Hello World" inside settings.gradle at root, without any .name file inside .idea/. It seams fine and persists after Gradle reloads 👍 .

Command or Code

cordova create hello com.example.hello "Hello World"
cd hello/
cordova platform add android

then "Open" platforms/android/ with IntelliJ IDEA or Android Studio

Environment, Platform, Device

IntelliJ IDEA 2020 and 2021, and Android Studio(not tested)

Version information

Cordova CLI 10.0.0
Cordova Android 9.1.0
Windows 10

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
ath0mas added a commit to ath0mas/cordova-android that referenced this issue Apr 17, 2021
@breautek breautek added the bug label Apr 19, 2021
erisu pushed a commit to erisu/cordova-android that referenced this issue Jul 13, 2021
ath0mas added a commit to ath0mas/cordova-android that referenced this issue Aug 1, 2021
ath0mas added a commit to ath0mas/cordova-android that referenced this issue Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants