简体   繁体   English

android的新手,无法在手机上从github运行项目

[英]new to android, not able to run project from github on phone

I tried to import this project form github into eclipse then I right clicked on the project which is called 'main' - chose "run as" - android application, yet the application did not automatically run on my phone, rather nothing happened. 我试图将这个项目从github导入到eclipse中,然后右键单击名为“ main”的项目-选择“运行方式”-android应用程序,但是该应用程序并未在我的手机上自动运行,但是什么也没发生。 Here is what my console states: 这是我的控制台状态:

2013-11-02 14:25:11 - main] ------------------------------ [2013-11-02 14:25:11 - main] Android Launch! 2013-11-02 14:25:11-main] ------------------------------ [2013-11-02 14 :25:11-main] Android启动! [2013-11-02 14:25:11 - main] adb is running normally. [2013-11-02 14:25:11-main] adb运行正常。 [2013-11-02 14:25:11 - main] No Launcher activity found! [2013-11-02 14:25:11-main]找不到启动器活动! [2013-11-02 14:25:11 - main] The launch will only sync the application package on the device! [2013-11-02 14:25:11-main]启动将仅同步设备上的应用程序包! [2013-11-02 14:25:11 - main] Performing sync [2013-11-02 14:25:11 - main] Automatic Target Mode: using device '0149B3A10400A004' [2013-11-02 14:25:12 - main] Application already deployed. [2013-11-02 14:25:11-main]执行同步[2013-11-02 14:25:11-main]自动目标模式:使用设备'0149B3A10400A004'[2013-11-02 14:25:12 -main]应用程序已部署。 No need to reinstall. 无需重新安装。 [2013-11-02 14:25:12 - main] /main/bin/main.apk installed on device [2013-11-02 14:25:12 - main] Done! [2013-11-02 14:25:12-main] /main/bin/main.apk安装在设备上[2013-11-02 14:25:12-main]完成!

I looked for some app called main, but didnt find it. 我寻找了一个名为main的应用程序,但没有找到它。 but still, it should have launched automatically.. 但是它应该已经自动启动了。

It seems your manifest.xml doesn't declare an Activity as launcher Activity. 看来您manifest.xml并未将Activity声明为启动器Activity。 You need to specify an Activity and insert an Intent-Filter in its declaration in the manifest.xml like this: 您需要指定一个Activity,然后在manifest.xml的声明中插入一个Intent-Filter,如下所示:

    <activity
        android:name="[package-name].[activity-name]"
        android:label="[app_name]" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM