Why programming in android can not use setTexture()? While I run the program there always produce an error? Is there any substitute for this method?
You should always post the error and the whole stack…
If you are using Android studio :
Possible outcomes :
1- you donot have the texture inside your
assets folder .( May be your having them at the
mipmap which wonot work with jme & usually produce IOException or illegealState according to how it’s handled).
2- you may have tried to use
materialA.setTexture() when indeed you havenot defined the materialA , produce a NPE.
3-you may have tried to change undefined shader attribute or varname inside the setTexture() method
materialA.setTexture("invalidAttr",assetManager.loadTexture("assets/tex.png")); & that would be an IllegalArgumentException but there would be an additional message to tell you , you have no value by this defined inside this file.
Nothing would be approved ,but only if you show the stackTrace or a snippet of your code !
cheers bro, I have figured out that. The problem is the wrong path. Thank you very much
cheers I have solved that