Read a specific line from a txt file in Android

I have a txt file in my resources folder and I want to read a random line from the file and show it somewhere. Here is my code:

string[] lines = System.IO.File.ReadAllLines (path); showtext.text = lines[Random.Range(0,lines.Length)];

It works pretty well on PC but does not on Android. I figured out that I got my ‘path’ wrong. Can any one help me?

You can’t find it because the Resources folder does not exist in the apk. Instead, create a reference to a TextAsset and assign it through the inspector.

public class MyClass : MonoBehaviour
{
    public TextAsset TextFile;
}