I recently got this warning in Layout
and manifest files.
I have attached those images below just check those in case for further clarification.
The problem is I'm getting Namespace " is not bound warning and I cannot use the autocomplete code for xml files which can be generally used in android studio.Please help for this issue. The unknown xml attribute warning is displayed for each and every android attribute.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue"
>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textColor="@android:color/white"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_margin="10dp"
android:layout_above="@+id/editText"
android:layout_alignLeft="@+id/editText"
android:layout_marginBottom="15dp"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="15"
android:padding="10dp"
android:id="@+id/editText" android:layout_gravity="center"
android:layout_centerInParent="true"
android:background="@color/white"/>
</RelativeLayout>
</RelativeLayout>
It is very simple. Delete .caches file:
C:\Users\user\AppData\Local\Google\AndroidStudio2020.3\caches
)NB: This Solution is for Android Studio 4+
if you are using Android Studio 3+ then delete cache from the following path
C:\Users\user.AndroidStudio3.x\system\caches
Ran into the same issue. I think that there's some specific bug related to this for Android Studio 3.2. My solution on Windows was to delete everything withing the cache/ folder in the .AndroidStudio3.2/ folder.
I tried everything that other's mentioned, sync gradle files, invalidate cache, removed the whole project and added it again. The only thing that worked for me was reinstalling the Android Studio. The second time that happened to me I decided to look for a better solution than reinstalling the whole Android Studio. Started playing with the cache files and figured out that deleting everything under the cache/ folder in the configuration folder of the Android Studio solved the problem.
This is problem with Android studio caches.
most probably syncing the project with gradle files will help
If no, you can manually delete cached files located on $HOME/.AndroidStudio3.2/system/caches and rebuild your project.
UPDATE: Gradle sync cache isses fixed in android studio 3.5 version. Update android studio to latest version can help.
100% Working
Do this two steps:
C:\Users\User_folder\.AndroidStudio3.6\system\caches
.C:\Users\User_folder\AndroidStudioProjects\Project_name\.idea\caches
.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