gpt4 book ai didi

android - 运行应用程序时出错 : Default Activity not found

转载 作者:行者123 更新时间:2023-11-29 01:09:56 26 4
gpt4 key购买 nike

我是 Android Studio 新手。我现在正在使用它,希望获得一些错误消息来解释为什么我的 APK 无法在 Blue Stacks 中运行。 APK 是在 Unity 中构建的。

安装Android Studio、手机模拟器等后,还是无法运行APK。它说:

Error running app: Default Activity not found

已经有a post关于 Stack Overflow 中的这个错误。但是,我的 AndroidManifest.xml 看起来不错。我也尝试过“使缓存无效/重新启动”无济于事。当我转到“编辑配置”>“启动选项”>“指定 Activity ”时,我看不到任何可供选择的 Activity 。

下面是我的 AndroidManifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:theme="@ref/0x01030006"
android:versionCode="91"
android:versionName="91"
android:installLocation="2"
package="com.quizjungle.android"
platformBuildVersionCode="25"
platformBuildVersionName="7.1.1">

<supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true" />

<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="25" />

<application
android:label="@ref/0x7f060050"
android:icon="@ref/0x7f02004c"
android:debuggable="false"
android:banner="@ref/0x7f02004b"
android:isGame="true">

<activity
android:label="@ref/0x7f060050"
android:name="com.unity3d.player.UnityPlayerNativeActivity"
android:launchMode="2"
android:screenOrientation="1"
android:configChanges="0x40000fff">

<intent-filter>

<action
android:name="android.intent.action.MAIN" />

<category
android:name="android.intent.category.LAUNCHER" />

<category
android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>

<meta-data
android:name="unityplayer.UnityActivity"
android:value="true" />

<meta-data
android:name="unityplayer.ForwardNativeEventsToDalvik"
android:value="true" />
</activity>

<activity
android:theme="@ref/0x01030011"
android:name="com.facebook.unity.FBUnityLoginActivity"
android:configChanges="0x40000fff" />

<activity
android:theme="@ref/0x01030011"
android:name="com.facebook.unity.FBUnityDialogsActivity"
android:configChanges="0x40000fff" />

<activity
android:name="com.facebook.unity.FBUnityAppLinkActivity"
android:exported="true" />

<activity
android:name="com.facebook.unity.FBUnityDeepLinkingActivity"
android:exported="true" />

<activity
android:name="com.facebook.unity.FBUnityGameRequestActivity" />

<activity
android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" />

<activity
android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" />

<activity
android:name="com.facebook.unity.AppInviteDialogActivity" />

<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="1479999760.000000" />

<provider
android:name="com.facebook.FacebookContentProvider"
android:exported="true"
android:authorities="com.facebook.app.FacebookContentProvider365740347105248" />

<activity
android:theme="@ref/0x01030011"
android:name="com.chartboost.sdk.CBImpressionActivity"
android:excludeFromRecents="true"
android:configChanges="0x4a0"
android:hardwareAccelerated="true" />

<meta-data
android:name="com.google.android.gms.version"
android:value="@ref/0x7f050000" />

<activity
android:theme="@ref/0x7f08000f"
android:name="com.facebook.FacebookActivity"
android:configChanges="0x5b0" />

<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true" />

<activity
android:name="com.facebook.CustomTabMainActivity" />

<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false" />

<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true"
android:exported="false" />

<receiver
android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
android:permission="android.permission.INSTALL_PACKAGES"
android:enabled="true">

<intent-filter>

<action
android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:exported="false"
android:authorities="com.quizjungle.android.firebaseinitprovider"
android:initOrder="100" />

<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true">

<intent-filter
android:priority="-500">

<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>

<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:permission="com.google.android.c2dm.permission.SEND"
android:exported="true">

<intent-filter>

<action
android:name="com.google.android.c2dm.intent.RECEIVE" />

<action
android:name="com.google.android.c2dm.intent.REGISTRATION" />

<category
android:name="com.quizjungle.android" />
</intent-filter>
</receiver>

<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />

<activity
android:theme="@ref/0x01030011"
android:name="com.unity.purchasing.googleplay.PurchaseActivity"
android:configChanges="0x40000fff" />

<activity
android:theme="@ref/0x0103000f"
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="0xfb0" />

<activity
android:theme="@ref/0x7f080000"
android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity" />

<activity
android:theme="@ref/0x01030010"
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false" />
</application>

<uses-permission
android:name="android.permission.INTERNET" />

<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission
android:name="android.permission.android.permission.READ_PHONE_STATE" />

<uses-permission
android:name="android.permission.WAKE_LOCK" />

<permission
android:name="com.quizjungle.android.permission.C2D_MESSAGE"
android:protectionLevel="0x2" />

<uses-permission
android:name="com.google.android.c2dm.permission.RECEIVE" />

<uses-permission
android:name="com.quizjungle.android.permission.C2D_MESSAGE" />

<uses-permission
android:name="com.android.vending.BILLING" />

<uses-feature
android:glEsVersion="0x20000" />

<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />

<uses-feature
android:name="android.hardware.touchscreen.multitouch"
android:required="false" />

<uses-feature
android:name="android.hardware.touchscreen.multitouch.distinct"
android:required="false" />
</manifest>

enter image description here

我应该怎么做才能运行 APK?

* 更新 *

不知道有没有用。当我运行“分析 APK...”时,我得到以下信息:enter image description here

* 更新 2 *在我的 Android Studio list 旁边还有一个红色感叹号,上面写着“URI 未注册。”,指向这一行:

xmlns:android="http://schemas.android.com/apk/res/android"

最佳答案

尝试将此代码添加到您的 list 中:

<category android:name="android.intent.category.LAUNCHER" />

关于android - 运行应用程序时出错 : Default Activity not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43904199/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com