我目前正在为Lenovo Mirage独奏开发应用程序。
但是,当我想通过Android Studio启动该应用程序时,联想告诉我,我必须更新系统才能运行该应用程序。
这是不正确的,因为我使用与Lenovo相同的API级别(API级别26
)和较低的GVR SDK版本(我使用1.180
,Lenovo具有1.183
)。 / p>
logcat输出有此错误:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.daydreamtest, PID: 10991
java.lang.IllegalStateException: Daydream client must use the VR display service.
在我的Samsung Galaxy S9 +上,该应用程序运行正常。...
有人可以帮我吗?我已经尝试调试它很长时间了:(
这是我的AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.daydreamtest">
<!-- The VR app is Daydream-only since it uses the controller. -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" /> <!-- OpenGL Version, in this case ES 3.0 (since API 18)
https://developer.android.com/guide/topics/graphics/opengl -->
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>
<uses-feature android:name="android.software.vr.mode" android:required="true"/>
<uses-feature android:name="android.hardware.vr.high_performance" android:required="true"/>
<application>
<!-- VR Activity -->
<activity
android:name=".MainActivity"
android:label="DayDream Test"
android:screenOrientation="landscape"
android:enableVrMode="true"
android:resizeableActivity="false"
android:theme="@style/VrActivityTheme"
android:configChanges="density|keyboardHidden|navigation|orientation|screenSize|uiMode">
<!-- The VR icon to be used in Daydream Home comes in two parts: a foreground icon and a
background icon. The foreground icon is also used by the 2D Activity. -->
<!-- This Activity only shows up in Daydream Home and not the 2D Launcher. -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="com.google.intent.category.DAYDREAM"/>
</intent-filter>
</activity>
</application>
</manifest>