The launch will only sync the application package on the device!

在开始学习Android的开发时,有时候可能刚写完一个布局文件,就急忙忙的运行程序,此时会毫不留情的在控制台报错:No Launcher activity found!

The launch will only sync the application package on the device!这是因为没有修改AndroidManifest.xml文件,程序没有找到入口,也就是没有将你的activity配置在AndroidManifest.xml中。

解决办法:在AndroidManifest.xml中加入你编写的主Activity,如我的是MainActivity

 <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        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" />
            </intent-filter>
        </activity>
    </application>
时间: 2025-01-05 01:10:11

The launch will only sync the application package on the device!的相关文章

ios真机调试---Could not inspect the application package

Could not inspect the application package. 无法检查应用程序包 如果在真机调试中出现这个问题一定是创建项目的时候用的是中文 解决办法只有创建项目的时候不要使用中文,如果想让应用名称为中文可以设置Bundle display name 在Info.plist文件中添加Bundle display name

XCODE 6 经常报错 “Could not inspect the application package”

XCODE 6.01,真机运行时,总是是 第一次 蹦出弹窗, 提示:App installation failedCould not inspect the application package. 再来一次就可以运行了.但是,一直反复出现. 为什么呢? 分析后发现:项目一开始是没有问题的.后来我把工程名改成中文,就出现这个问题了.所以只要恢复成之前的英文就好了.

iOS,Xcode11,解决“could not inspect application package” 导致的无法真机器运行

总结了一下可能存在3种情况 1. App命名出错了 你的App的名字中有非拉丁字符,也可能因为复制粘贴你App中包含了一些不可见的不正常字符,建议大家先改一下 引用自:https://stackoverflow.com/a/26393651 2. 你添加的第三方动态库需要配置一下 在这个路径下 BuildPhases -> Embedded Frameworks ->Enable "Copy only when installing" 引用自:https://stackov

Android实践项目汇报(三)

3系统的详细设计 3.1系统主界面的设计一般思路 一般我们制作头部菜单栏是为了提升软件的可操作性,可以用的是TabHost+RadioGroup相结合的方法来制作这个部分的.菜单栏的底部位置是通过TabHost这个布局来实现的,然后是LinearLayout的线性布局来布置内容.内部的选项卡是通过TabWiget来实现. 首先建立好Android工程(我的工程名为:ScheduleManager),在工程下的res/layout下建立一个名为main的空xml文件,然后在这个文件里按照思路来添加

android(eclipse)新手常见问题总结(一)

1:jdk无法更新   进入工具里面手动获取镜像资源 并且改为强制 2:报错:This version of the rendering library is more recent than your version of AD 在布局预览中重新选择适合你的sdk的版本 3:当添加文本信息有黄色感叹号错误时或者报错(I18N] Hardcoded string "this is textview", should use @string resource) 可以在string 添加&

android第一天错误

1.自己写的activity并在AndroidManifest.xml中注册 在模拟机上运行时出现 No Launcher activity found! The launch will only sync the application package on the device! 模拟机中没有文件 解决方法:在注册时 AndroidManifest.xml中 <intent-filter> <action android:name="android.intent.actio

Android开发小问题总结

Android开发遇到的小问题之小解: @[email protected] 编译运行安卓程序时 eclipse里console里提示The launch will only sync the application package on the device 经查找是AndroidManifest.xml里的主activity里红色部分没加,, <activity            android:label="@string/XXX"            android

Android程序安装后应用图标不显示的问题

原文地址:http://trinea.iteye.com/blog/1463296 本文主要介绍Android应用程序安装后图标不显示的几个可能原因. 自己写的程序突然安装后图标不见了,在应用程序安装中能找到,但是桌面上就是没有图标,启动只能从最近列表中其中..一般这种情况只会在服务类程序和测试程序中出现,因为不需要图标. google无果,自己二分调试解决了,并测试了其他网友提供的其他会出错原因,大致总结如下: 1.AndroidManifest中application元素属性设置问题 属性设

【转】关于android应用程序的入口

android应用程序,由一到多个Activity组成.每个Activity没有很紧密的联系,因为我们可以在自己的程序中调用其它Activity,特别是调用自己的代码之外生成的Activity,比如android提供的发短信或者打电话的Activity. Intent call = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+phonenumber); startActivity(call); Intent sms = new Inte