I am new to Android Studio.
Currently, the package for the MainActivity.java is:
package com.davidgassner.plainolnotes.;
I want the directory for the subpackage to be: packagecom.davidgassner.plainolnotes.data;
When I created the subpackage using your's and Android Studio's instruction
I got the following:
package com.davidgassner.plainolnotes.com.davidgassner.plainolnotes.data;
I am getting an indication from Android Studio that the above path is not correct.
Right click to src folder in your project->New->package. write the name of the package there->Finish. you will see the package what you named under src folder of your project. Add class files into that package.
Right click in your main package -> New -> Package -> Give a name to your package and there you go.
If your main package is com.davidgassner.plainolnotes
and you want to create com.davidgassner.plainolnotes.data
, follow the steps above and when asked to input the package name, supply only "data". It will be created like this:
+ com.davidgassner.plainolnotes
+ data
In the top left corner you can switch your perspective from Android
to Project
to see all your project structure:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With