Nicholas Dingle Nicholas Dingle - 6 months ago 19
Android Question

Does anyone know the what's causing "Package name is not a valid package name" when adding a new layout?

I've receiving this error in every project I make, new or otherwise.

Error in Android Studio

I've attempted reinstalling Android Studio fresh without any luck and I've also scoured the Internet for the exact error and nothing seems to be coming up.

Does anyone have an idea of what's causing this error when I add a new layout to my project?

Answer

As your screenshot shows,current package name is layout,but maybe you don't have a package named layout,so such error existed.

If you want to add a layout file to your project,you should right click layout folder under res folder,and create a layout file.