Does anyone know the what’s causing “Package name is not a valid package name” when adding a new layout?

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.

Leave a Comment