unity 2019.4.15f sharedassets0.assets' is corrupted! Remove it and launch unity again!

I am facing the following errors at the time of running an android build and it is crashing instantly,
I have checked the other forums on this top as well which has the following suggestion,
which doesn’t work in my case


Suggestion :

  • Make sure there should not be any duplicate files with the same name and different extension
    ex TestScript.cs and TestScript.js (as from 2014 on onward .js script not supported so there is no .js script in my project )
  • Make sure abstract class should not have “[Serializable]” attribute (in my case no abstract class has “[Serializable]” attribute)

Error: (error read from android studio Logcat )

  • 021-01-20 12:50:29.215 5630-5802/? E/Unity: The file '/data/app/com.TestGame.ChefMaster-1/base.apk/assets/bin/Data/sharedassets0.assets’ is corrupted! Remove it and launch unity again!
    [Position out of bounds!]
    (Filename: Line: 214)

  • 2021-01-20 12:50:29.722 5630-5802/? E/Unity: The file '/data/app/com.TestGame.ChefMaster-1/base.apk/assets/bin/Data/sharedassets0.assets’ is corrupted! Remove it and launch unity again!
    [Position out of bounds!]
    (Filename: Line: 220)


Hey if any know the solution for this problem I will be a great help

I am using the following code for a scriptableoObject can this will be a cause of it?


public class BaseItem<T, U> where T : struct where U : Object
    {
        public T type;
        
        public string resourcePath;
#if UNITY_EDITOR
        public U obj;
#endif
    }

    public class BaseItemRef<T, U, V> : ScriptableObject where T : BaseItem<U, V> where U : struct where V : Object
    {
        [SerializeField] protected List<T> itemList;
        [SerializeField] private Dictionary<U, T> itemDic;

        private void Init()
        {
            var count = itemList.Count;
            itemDic = new Dictionary<U, T>();
            for (var i = 0; i < count; i++)
            {
                itemDic.Add(itemList_.type, itemList*);*_

}
}

public T GetItemByType(U type)
{
if (itemDic == null)
Init();
if (itemDic.ContainsKey(type))
return itemDic[type];
return null;
}

public V GetObjectByType(U type)
{
var data = GetItemByType(type);
if (data != null)
{
return Resources.Load(data.resourcePath);
}
Debug.LogError($"Cannot able to find {type.ToString()} please add it tp ref ");
return null;
}

#if UNITY_EDITOR
public virtual void AssignRef()
{
var count = itemList.Count;
for (var i = 0; i < count; i++)
{
itemList_.resourcePath = itemList*.obj.GetResourcePath();
}*_

SaveChanges();
}

protected void SaveChanges()
{
UnityEditor.EditorUtility.SetDirty(this);
UnityEditor.AssetDatabase.SaveAssets();
}

public void Initialize()
{
Init();
}
#endif
}