Android Studio:应用程序图标未出现在主屏幕或应用程序列表中 [英] Android Studio: App icon doesn't appear in the home screen or app list
问题描述
我自己开发的应用存在严重问题.
I have a serious problem with my self developed app.
长话:
我已经创建了一个应用程序并在我的台式电脑上开发了它.因为我需要向我的客户展示它,我决定在我的笔记本上安装 android studio 并在那里试用该应用程序.我在我的笔记本上导入了项目并启动了 Android Studio,我运行了该项目,该应用程序像往常一样在我的智能手机上启动并运行,但是......当我回到主屏幕时,图标丢失了(在我的桌面上时)pc 版本已显示),它甚至不在应用程序列表中,但如果我继续设置"-->管理应用程序",它会显示在那里,我可以卸载或停止它,但因为我没有一个图标 如果我不使用 Android Studio 重新运行应用程序,我将无法再次启动它.我回到我的台式电脑并尝试从那里重新运行应用程序,但没有任何改变,图标仍然丢失.
I have created an app and developed it on my desktop pc. Because I need to show it to my customer, I decided to install android studio on my Notebook and try the app there. I imported the project on my Notebook and started Android Studio, I ran the project, the app started and worked like always on my smartphone but......when I went back to the homescreen the Icon was missing (while on my desktop pc version was shown) and it wasn't even in the app list, but if I go on "Settings" --> "Manage applications", it's shown there, I can unistall or stop it, but because I don't have an icon I can't start it again if I don't rerun the app with Android Studio. I went back to my desktop pc and tried to rerun the app from there, but nothing changed the icon is still missing.
Short Story:在我的笔记本上使用 android studio 在我的手机上重新安装我的应用程序后,主屏幕和应用程序列表中缺少应用程序图标,但我可以在设置"->管理应用程序"中看到它.如果我回到我开发应用程序的原始电脑并尝试重新运行它,结果是一样的...图标丢失.
Short Story: After reinstalling my app on my phone with android studio from my notebook, the app icon is missing from the home screen and application list, but I can see it in "Settings" --> "Manage applications". If I go back to my original pc where I developed the app and try to rerun it, the result is the same...icon missing.
我在 Stackoverflow 上阅读了所有与我的问题类似的帖子,但没有任何帮助我解决它.我希望有人可以帮助我.
I read all the post that are similar to my problem on Stackoverflow, but nothing helped me to resolve it. I hope that someone can help me about it.
如果需要,我发布了 AndroidManifest.xml,但由于隐私/版权问题,我无法发布所有代码,抱歉.我尽量用最正确的英语写作,如果我的写作很糟糕,我提前道歉.
I posted the AndroidManifest.xml if needed but I can't post all the code because of privacy/copyright, sorry. I tried to write in the most correct english I could, I apologize in advance if my writing is horrible.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.steel.bluetoothdatatransfer" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.SMS_DELIVER_ACTION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- <uses-permission android:name="android.permission.BROADCAST_SMS" /> -->
<application
android:allowBackup="true"
android:icon="@drawable/ic_bt"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</activity>
<receiver
android:name=".RecMex"
android:enabled="true"
android:exported="true"
android:permission="android.permission.BROADCAST_SMS" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<!-- BroadcastReceiver that listens for incoming MMS messages -->
<receiver
android:name=".MmsReceiver"
android:enabled="true"
android:exported="true"
android:permission="android.permission.BROADCAST_WAP_PUSH" >
<intent-filter>
<action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
<data android:mimeType="application/vnd.wap.mms-message" />
</intent-filter>
</receiver>
<!-- Activity that allows the user to send new SMS/MMS messages -->
<activity
android:name=".ComposeSmsActivity"
android:label="@string/title_activity_compose_sms" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</activity>
<!-- Service that delivers messages from the phone "quick response" -->
<service
android:name=".HeadlessSmsSendService"
android:enabled="true"
android:exported="true"
android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" >
<intent-filter>
<action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</service>
<!-- BroadcastReceiver that listens for incoming SMS messages -->
<receiver
android:name=".SmsReceiver"
android:permission="android.permission.BROADCAST_SMS" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_DELIVER" />
</intent-filter>
</receiver>
<activity
android:name=".DeviceListActivity"
android:label="@string/intestazione"
android:theme="@android:style/Theme.Holo.Dialog"
>
</activity>
</application>
推荐答案
发生这种情况是因为您将所有内容都传递到了一个意图过滤器中.尝试在每个用例中将它们分开,或者至少将启动器和主过滤器分开.
It is happening because you passed everything into one intent filter. Try to separate them per use case or at least separate Launcher and Main filter.
像这样:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
这篇关于Android Studio:应用程序图标未出现在主屏幕或应用程序列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!