Вопрос

I followed the procedure on Using Hardware Device from google android's page, after having problems with emulator. After having followed everything provided on google's hardware page, i created a new project and ran it, it gave me the following,

[2014-03-17 18:35:18 - FirstAppProject] ------------------------------
[2014-03-17 18:35:18 - FirstAppProject] Android Launch!
[2014-03-17 18:35:18 - FirstAppProject] adb is running normally.
[2014-03-17 18:35:18 - FirstAppProject] No Launcher activity found!
[2014-03-17 18:35:18 - FirstAppProject] The launch will only sync the application package on the device!
[2014-03-17 18:35:18 - FirstAppProject] Performing sync
[2014-03-17 18:35:18 - FirstAppProject] Automatic Target Mode: using device '0123456789ABCDEF'
[2014-03-17 18:35:18 - FirstAppProject] Uploading FirstAppProject.apk onto device '0123456789ABCDEF'
[2014-03-17 18:35:19 - FirstAppProject] Installing FirstAppProject.apk...
[2014-03-17 18:35:25 - FirstAppProject] Success!
[2014-03-17 18:35:25 - FirstAppProject] \FirstAppProject\bin\FirstAppProject.apk installed on device
[2014-03-17 18:35:25 - FirstAppProject] Done!

Which seem to me that the app is installed on my device, but i cant seem to find the app on my device so that i can test it.

What to do ?

Это было полезно?

Решение

If that is your manifest:

<manifest xmlns:android="schemas.android.com/apk/res/android";    
  package="com.faizanchaki.firstappproject" android:versionCode="1" 
  android:versionName="1.0" > 
  <uses-sdk android:minSdkVersion="8"      
            android:targetSdkVersion="17" /> 
  <application android:allowBackup="true" 
      android:icon="@drawable/ic_launcher" android:label="@string/app_name" 
      android:theme="@style/AppTheme" > 
      <!-- no activities declared here -->
  </application> 
</manifest>

Then you are missing the declaration of a main activity like:

    <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>

you should declare the main activity in your Manifest so that your app icon will appear in the android launcher and you will be able to actually start your app. Just put your Activity name and add it to the main manifest where I put the comment.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top