Consider the changes below. I think that should fix it. Can you confirm what is your Android mode version and Processing version? Also what is your OS. I am assuming you have run other simpler examples in your phone before, right? Always try simple examples just for sanity check…
Kf
import android.R;
...
//fl = (FrameLayout)act.findViewById(0x1000); //Valid for AM version older than 4
fl = (FrameLayout)act.findViewById(R.id.content); //Use for AM 4.0 and newer