找不到ArCore相机:0

时间:2019-03-10 16:22:37

标签: android kotlin arcore

我在ArCore中遇到问题。我试图通过片段运行活动,但是应用程序崩溃并显示以下日志:

E/native: status.cc:156 generic::not_found: Camera not found: 0

D / AndroidRuntime:关闭VM

--------- beginning of crash

E / Android运行时:致命异常:主要     流程:com.goodrequest.matel,PID:3055     java.lang.RuntimeException:无法恢复活动{com.goodrequest.matel / ui.ArCoreActivity}:com.google.ar.core.exceptions.FatalException         在android.app.ActivityThread.performResumeActivity(ActivityThread.java:3429)         在android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3469)         在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2732)

                            ...

通话活动:

main_button_launch_ar.setOnClickListener {
       val intent = Intent(this,ArCoreActivity::class.java)
       startActivity(intent)
   }

我的活动: 类ArCoreActivity:AppCompatActivity(){

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_arcore)

}

清单:

<?xml version="1.0" encoding="utf-8"?>

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-feature android:name="android.hardware.camera.ar" android:required="true" />



<application
        android:name="ui.Applicatiooon"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="false"
        android:theme="@style/AppTheme"
        tools:ignore="GoogleAppIndexingWarning">


    <uses-library android:name="org.apache.http.legacy" android:required="false" />
    <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key"/>
    <meta-data
            android:name="com.google.ar.core"
            android:value="required" />

    <activity
            android:name="ui.MapsActivity"
            android:label="@string/title_activity_maps">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <activity
            android:name="ui.ArCoreActivity"
            android:label="@string/title_activity_maps">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application>

我在做什么错人?

0 个答案:

没有答案