【发布时间】:2021-03-27 06:29:03
【问题描述】:
我在网上找到了一些代码块,sn-p 的主要目的是获取 res 文件夹内的图像 URI,但是当我将代码更改为我的应用程序路径时......应用程序崩溃了!我知道解决方案很简单但很棘手,所以请帮助我 这是方法
public static SkyBox getSkyBox1() {
try {
return new SkyBox(new URI[]{
URI.create("com.habie.a3d_model/res/drawable/right.png"),
URI.create("com.habie.a3d_model/res/drawable/left.png"),
URI.create("com.habie.a3d_modelres/drawable/top.png"),
URI.create("com.habie.a3d_model/res/drawable/bottom.png"),
URI.create("com.habie.a3d_model/res/drawable/front.png"),
URI.create("com.habie.a3d_model/res/drawable/back.png")});
} catch (IOException e) {
throw new RuntimeException(e);
这些是我想要使用的图像....
【问题讨论】: