Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio renaming module

After renaming module in Android Studio i get error Project SDK is not defined.

How can I rename module from app to my-name whit out getting error.

The problem is with renaming, I believe.

I use Shift+Alt+R to rename the module. If I rename the directory I get this error. If I rename module, after restart there are no previous changes. the problem is not in setting SDK, the problem is that classes are no longer in package. The AS doesn't know that this module is android app because there is also previously created

like image 819
5er Avatar asked Apr 20 '26 10:04

5er


1 Answers

To raname a module, go to settings.gradle and rename the module to your new name. Then close Android Studio, and rename the folder using File Explorer. Now reopen Android studio and your module name will be updated.

Simply renaming using the refactor tool does not do the job.

like image 186
AidenFry Avatar answered Apr 22 '26 22:04

AidenFry