`@layout/activity_main` does not contain a declaration with id `mEtIP`
时间: 2023-10-22 15:05:19 浏览: 341
LCD.rar_stm32 .s contain
This error occurs when the ID `mEtIP` is not declared in the layout file `activity_main.xml`. You need to make sure that the ID `mEtIP` is present in the XML file and is spelled correctly.
If the ID is not present, you can add it by opening the layout file and adding the following line of code inside the appropriate layout element:
```
<EditText
android:id="@+id/mEtIP"
... />
```
Make sure to replace `...` with any other attributes you want to set for the `EditText`.
If the ID is present but still causing the error, try cleaning and rebuilding your project before running it again.
阅读全文