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>
  • 相关阅读:
    7-30-组队赛
    POJ 3125 Printer Queue
    7-28-比赛
    POJ 3922 A simple stone game
    POJ 1845
    第一次组队训练
    I-number
    Radar Installation
    Robots on a grid(DP+bfs())
    Dividing a Chocolate(zoj 2705)
  • 原文地址:https://www.cnblogs.com/yby-blogs/p/4375380.html
Copyright © 2011-2022 走看看