Error message: one or more layouts are missing the layout_width or layout_height attributes
The reason for the error: I currently understand that the page layout does not match
Solution 1: Modify the screen size of the xml display, try a few more times.
Solution 2:
The layout cannot be loaded and the xml has no errors, prompting NOTE: One or more layouts are missing the layout_width or layout_height attributes. these are required in most layouts
Close Android Studio
Go to C:\Users\UserName\ .android directory, rename build-cache to buildcache.bak
Go to C:\Users\UserName\ .AndroidStudio3.2\system directory
(1) caches rename to caches.bak
(2) compiler rename to compiler.bak
(3) compile-server renamed to compile-server.bak
(4) conversion renamed to conversion.bak
(5) external_build_system rename to external_build_system.bak
(6) frameworks rename to frameworks.bak
(7) gradle rename to gradle.bak
(8) resource_folder_cache rename to resource_folder_cache.bak
Start Android Studio and open your project, the problem is solved
Close Android Studio
Go to C:\Users\UserName.android and rename the build-cache folder to buildcache.bak
Go to C:\Users\UserName.AndroidStudio3.2\system and rename these folders
(1) caches to caches.bak
(2) compiler to compiler.bak
(3) compile-server to compile-server.bak
(4) conversion to conversion.bak
(5) external_build_system to external_build_system.bak
(6) frameworks to frameworks.bak
(7) gradle to gradle.bak
(8) resource_folder_cache to resource_folder_cache.bak
Open the Android Studio and open your project again.
Similar Posts:
- Android AAPT2 error: check logs for details [How to Solve]
- Plugin is too old, please update to a more recent
- How to Solve Error: The following classes could not be instantiated
- Gradle‘s dependency cache may be corrupt [How to Solve]
- AndroidStudio Error: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:app:proces
- Android ERROR: This version of Android Studio cannot open this project, please retry with Android Studio 3.6 or newer.
- Could not find com.android.tools.build:gradle:3.3.0.
- Ionic build android, Error: spawn EACCES [How to Solve]
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- How to Solve error: com.android.ide.common.process.ProcessException: Failed to execute aapt