【发布时间】:2014-05-25 04:32:46
【问题描述】:
我正在使用 Gameplay3D 编写一个 Android 应用程序。我可以使用 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>
我已经更改了游戏的名称和公司,因为它们目前是一个秘密,但除此之外,这正是它在文件中的显示方式。
任何帮助将不胜感激:)
其他信息:
应用程序唯一要做的就是渲染精灵并接受输入。没有声音,没有互联网,没有别的。
两个 Nexuses (Nexi?:P) 都是 2012 版,而不是新的 2013 版。
我使用渲染到纹理。这会是个问题吗?也许使用非 2 次幂纹理?
我测试了,代码还在运行,就是什么都看不到。
【问题讨论】:
标签: android c++ ant android-ndk nexus-7