Texture in the Unity Resouces path doesn't load on Android

I’m developing a game for Android using Unity, and I need load some texture from the Resources path. But this only works in the editor, and when I build the project for Android, the image doesn’t load.

My code looks like this:

public void setTipTextTexture(string texture){ 
    texture = "TipTexts/" + texture; 
    this.tipTexture = Resources.Load(texture) as Texture; 
}

What am I doing wrong?

Your texture should be in a folder named ‘Resources’ for Resources.Load() to work or else it will work ony in editor not in build.Some thing like this will do.

Texture path - “Assets/Resources/MyTexture”

In code you can avoid the ‘Assets’ part

public void setTipTextTexture(string texture)
{
texture="TipTexts/"+texture;
this.tipTexture=(Texture)Resources.Load(texture,typeof(Texture));
}

Hope this helps!