我正在用Gameplay3D编写一个安卓应用程序。我可以使用NDK编译,使用ANT (调试和发布)生成APK。这个应用程序在Galaxy S3和Nexus 4上安装、启动和运行都很完美,但当我尝试在Nexus 7上启动它时,它什么都不显示。只有一个黑色的屏幕底部有导航条。
我有两个Nexus 7,每个都有不同版本的Android (一个是4.3,另一个是4.4)。
我在Android开发方面不是很有经验,但以下是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.secretCompany.secretGame"
android:versionCode="15"
android:versionName="1.0.0">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- This is the platform API where the app was introduced. -->
<uses-sdk android:minSdkVersion="10" />
<uses-feature android:glEsVersion="0x00020000"/>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
<!-- Our activity is the built-in NativeActivity framework class.
This will take care of integrating with our NDK code. -->
<activity android:name="android.app.NativeActivity"
android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:screenOrientation="landscape">
<!-- Tell NativeActivity the name of or .so -->
<meta-data android:name="android.app.lib_name"
android:value="secretGame" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest> 我已经更改了游戏的名称和公司,因为他们目前是一个秘密,但除此之外,这正是它在文件中出现的方式。
如能提供任何帮助,将不胜感激:)
附加信息:
这个应用程序唯一能做的就是渲染精灵并接受输入。没有声音,没有互联网,没有其他任何东西。
Nexuse (Nexi?:P)都是2012年版,而不是2013年版。
我用渲染到纹理。这会不会是个问题?也许是2种非功率的纹理?
我进行了测试,代码还在运行,我什么也看不见。
发布于 2014-05-25 05:24:17
啊,终于,我自己想出来了,从this post。问题是,几乎我所有的纹理都不是2的能量,而那些在当时是脱离屏幕的。
我真傻。
编辑:或者不是..。现在它不会显示任何东西,甚至不显示之前的2的纹理.OpenGL FBO必须有方形纹理才能工作在功率为2的设备上吗?
Edit2:啊,好吧,我终于找到问题了。我一开始是正确的,关于精灵没有2的力量纹理,但后来我重新启用我的渲染到纹理,它停止工作。结果问题是,我呈现给一个不同的FBO,然后提取纹理,将其转化为雪碧,并呈现为主FBO...and,当然,纹理不是2的力量。我刚刚创建了最低的PO2大小的纹理,整个屏幕仍然可以容纳,然后修改了全屏精灵的UV和弦,所以额外的纹理部分放在屏幕外。问题解决了!
https://stackoverflow.com/questions/23852026
复制相似问题