首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >白日梦应用程序在启动时崩溃

白日梦应用程序在启动时崩溃
EN

Stack Overflow用户
提问于 2016-07-21 17:05:06
回答 1查看 1K关注 0票数 1

我正在为android制作一个白日梦应用程序,但它马上就崩溃了。我不知道是什么引起了这个问题。我认为这与AndroidManifest有关,但在我看来还不错。我希望有人能帮我,因为这真的很烦人。我正在和Unity5一起工作,所以可能根本不可能制作一个带有Unity的白日梦应用程序?

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<manifest
     xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.unity3d.player"
     android:installLocation="preferExternal"
     android:versionCode="1"
     android:versionName="1.0">
     <supports-screens
         android:smallScreens="true"
         android:normalScreens="true"
         android:largeScreens="true"
         android:xlargeScreens="true"
         android:anyDensity="true"/>

    <application
         android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:debuggable="true">
        android:label="@string/app_name"
        android:supportsRtl="true"
       <activity android:name="com.unity3d.player.UnityPlayerActivity"
              android:label="@string/app_name">
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
       </activity>
       <service
             android:name=".MyDream"
             android:exported="true"
             android:icon="@drawable/app_icon"
             android:label="@string/app_name"
             android:permission="android.permission.BIND_DREAM_SERVICE">
            <intent-filter>
                 <action android:name="android.service.dreams.DreamService" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
             </service>
             </application>
 </manifest>
EN

回答 1

Stack Overflow用户

发布于 2016-07-21 19:23:39

可能是宣言。

你错过了重要的标签。

代码语言:javascript
复制
<!-- VR feature tags. -->
<uses-feature android:name="android.software.vr.mode" android:required="false"/>
<uses-feature android:name="android.hardware.vr.high_performance" android:required="false"/>

也是

代码语言:javascript
复制
<uses-feature android:glEsVersion="0x00020000" />

为了确保没有Marshmallow的运行时权限问题,alsi包括

代码语言:javascript
复制
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22"

您需要下载Google for Unity以便能够适当地开发Day梦应用程序

下面是Google的完整声明。

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application android:icon="@drawable/app_icon"
                 android:label="@string/app_name">
        <activity android:name="com.google.unity.GoogleUnityActivity"
                  android:label="@string/app_name"
                  android:screenOrientation="landscape"
                  android:launchMode="singleTask"
                  android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="com.google.intent.category.CARDBOARD" />
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>
        <meta-data android:name="IMMERSIVE_MODE" android:value="true" />
    </application>
    <!-- Set target sdk version to Lollipop to prevent issues with Marshmallow's runtime permissions. -->
    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22" />
    <uses-feature android:glEsVersion="0x00020000" />
    <uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
    <uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>
    <uses-permission android:name="android.permission.NFC"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <!-- VR feature tags. -->
    <uses-feature android:name="android.software.vr.mode" android:required="false"/>
    <uses-feature android:name="android.hardware.vr.high_performance" android:required="false"/>
</manifest>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38510306

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档