zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    工作的开端五
    工作的开端一
    工作的开端四
    工作的开端三
    工作的开端二
    springMVC基础配置
    3
    2
    文件操作Utils方法1
    解压zip并解析excel
  • 原文地址:https://www.cnblogs.com/yby-blogs/p/4375380.html
Copyright © 2011-2022 走看看