Installed HelloWorld app on physical Android device through Eclipse. How do I find it on phone?

StackOverflow https://stackoverflow.com/questions/22306326

سؤال

The console in Eclipse says this:

[2014-03-10 17:46:08 - MyFirstApp] ------------------------------
[2014-03-10 17:46:08 - MyFirstApp] Android Launch!
[2014-03-10 17:46:08 - MyFirstApp] adb is running normally.
[2014-03-10 17:46:08 - MyFirstApp] No Launcher activity found!
[2014-03-10 17:46:08 - MyFirstApp] The launch will only sync the application package on the device!
[2014-03-10 17:46:08 - MyFirstApp] Performing sync
[2014-03-10 17:46:17 - MyFirstApp] Uploading MyFirstApp.apk onto device 'TA88307T9S'
[2014-03-10 17:46:17 - MyFirstApp] Installing MyFirstApp.apk...
[2014-03-10 17:46:19 - MyFirstApp] Success!
[2014-03-10 17:46:19 - MyFirstApp] \MyFirstApp\bin\MyFirstApp.apk installed on device
[2014-03-10 17:46:19 - MyFirstApp] Done!

That is after importing a Hello World app from online. Now I was hoping to find an app icon on my phone to launch it, but I can't find it. How do I launch the app?

My manifest xml file now looks like this, after Merlevede's answer:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="19" />

<intent-filter android:label="@string/app_name">
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:debuggable="true"
    android:theme="@style/AppTheme" >

</application>

</manifest>

But issue persists.

هل كانت مفيدة؟

المحلول

No Launcher activity found!

As the logs saying that you do not have Launcher Activity. To solve this make any activity as laucher as per your requirement

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myfirstapp"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:debuggable="true"
        android:theme="@style/AppTheme" >

        <activity
            android:name="com.example.myfirstapp.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>

</manifest>

نصائح أخرى

The problem is in your Android Manifest xml file. You're missing some of these lines for your Main Activity (either the MAIN action, or the LAUNCHER category).

<activity android:name="mx.company.app.ActivityMain" android:label="@string/title_activity_main" >
    <intent-filter android:label="@string/app_name">
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top