I am working on a sample android app to learn more about android. Strangely, the app doesn't get installed on my Motorola Xoom.
Please note the app runs fine on the device. But when I see the app list on the device I can't find my app.
Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mycamapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.camera" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.mycamapp.CameraActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
</application>
</manifest>
I have tried some other sample apps(hello world!! kind of examples) and they get installed on my device just fine.
I do not see any apk install message when I run from eclipse. Can anyone advise, what is going wrong with the app?
I would guess the issue is with the <intent-filter>
of your CameraActivity
. All present elements have to match, and I guess the launcher does not have a image mimeType in its intents ;)
Remove the <data>
element from your <intent-filter>
, or move it to another one, and the icon should appear. You can have several intent filters for the same activity.
Source: Intents and Intent Filters
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.