gpt4 book ai didi

Android开发应用程序在应用程序中不可见

转载 作者:行者123 更新时间:2023-11-30 03:12:53 27 4
gpt4 key购买 nike

我制作了一个 Android 应用程序,通常它会显示在我的应用程序屏幕中。但是这次我找不到了。我的正常步骤:

  • 连接设备(真实设备,而非模拟器)
  • 调试应用
  • 现在该应用程序应该可以在“应用程序概览”中打开,但我找不到它

当我转到设置 -> 应用程序管理器 -> 我的应用程序可见时。

我是否从 list 中删除了某些内容?有什么建议吗?

没有类名的 Manyfest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0"
android:hardwareAccelerated="true" >

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

<uses-sdk android:targetSdkVersion="16" android:minSdkVersion="7"/>

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

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" android:hardwareAccelerated="true">
<activity
android:name="com.example.WebPageActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme"
android:hardwareAccelerated="true" >

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

<!-- <action android:name="android.intent.action.VIEW" /> -->
<category android:name="android.intent.category.LAUNCHER" />

<data android:scheme="http"
android:host="MYDOMAIN"
android:pathPrefix="" />
</intent-filter>
</activity>

<activity android:name="com.google.zxing.client.android.CaptureActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>

</manifest>

最佳答案

问题在于:

<data android:scheme="http"
android:host="MYDOMAIN"
android:pathPrefix="" />

如果有评论,您的应用图标将出现在启动器中。

来自文档:

android:host

Note: host name matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always specify host names using lowercase letters.

文档中有更多信息 here , herehere .

话虽这么说,但我不知道您的 条目到底出了什么问题,以及为什么它会导致您的问题 - 仍在努力填补我的知识空白:)

关于Android开发应用程序在应用程序中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20637588/

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