Unable to find activity,have you declared in manifest - android

I am trying to implement pdf viewer in my app.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ttech"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/logo1"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.ttech.SplashScreen"
android:label="#string/title_activity_splash_screen"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.ttech.MainActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.ttech.NewLogin"
android:label="#string/title_activity_new_login" >
</activity>
<activity
android:name="com.example.ttech.HomePage"
android:label="#string/title_activity_home_page" >
</activity>
<activity
android:name="com.example.ttech.Audio"
android:label="#string/title_activity_audio" >
</activity>
<activity android:name=".PdfViewerActivity"
android:label="#string/title_activity_pdf_viewer"
>
</activity>
<activity
android:name="com.example.ttech.Feedback"
android:label="#string/title_activity_feedback" >
</activity>
<activity
android:name="com.example.ttech.Profile"
android:label="#string/title_activity_profile" >
</activity>
<activity
android:name="com.example.ttech.AboutUs"
android:label="#string/title_activity_about_us" >
</activity>
<activity
android:name="com.example.ttech.Contact"
android:label="#string/title_activity_contact" >
</activity>
<activity
android:name="com.example.ttech.LogOut"
android:label="#string/title_activity_log_out" >
</activity>
<activity
android:name="com.example.ttech.LoginActivity"
android:label="#string/title_activity_login"
>
</activity>
</application>
The error is I am getting is:-
E/AndroidRuntime(828): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.ttech/net.sf.andpdf.pdfviewer.PdfViewerActivity}; have you declared this activity in your Android manifest

You declared the activity as
<activity android:name=".PdfViewerActivity"
android:label="#string/title_activity_pdf_viewer" />
Since you defined package="com.example.ttech", the activity points to the class com.example.ttech.PdfViewerActivity, but you want to use net.sf.andpdf.pdfviewer.PdfViewerActivity instead.
Therefore you have to define the activity with an absolute package name
<activity android:name="net.sf.andpdf.pdfviewer.PdfViewerActivity"
android:label="#string/title_activity_pdf_viewer" />

Related

Android application not installed on device error

I have an application that I have created on Eclipse. However, when I run this application, the widget is not appearing on the home screen. So, the only way to run the application is by connecting it via a USB cable and running it through the software, so I am unable to use the application on the move.
Is there anyway to solve this issue?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sunveersinghseera.wardrobematcher"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="20" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.hardware.CAMERA" />
<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.sunveersinghseera.wardrobematcher.MainActivity"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.sunveersinghseera.wardrobematcher.MainActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Camera"
android:label="#string/title_activity_camera" >
</activity>
<activity
android:name=".Gallery"
android:label="#string/title_activity_gallery" >
</activity>
<activity
android:name=".Favourites"
android:label="#string/title_activity_favourites" >
</activity>
<activity
android:name=".Categories"
android:label="#string/title_activity_categories" >
</activity>
<activity
android:name=".ViewHelp"
android:label="#string/title_activity_viewhelp" >
</activity>
<activity
android:name=".Settings"
android:label="#string/title_activity_settings" >
</activity>
<activity
android:name=".Contact"
android:label="#string/title_activity_contact" >
</activity>
<activity
android:name=".ContactImageAdapter"
android:label="#string/title_activity_contactimageadapter" >
</activity>
<activity
android:name=".CustomListAdapter"
android:label="#string/title_activity_customlistadapter" >
</activity>
<activity
android:name=".DataBaseHandler"
android:label="#string/title_activity_databasehandler" >
</activity>
<activity
android:name=".DisplayImageActivity"
android:label="#string/title_activity_displayimageactivity" >
</activity>
<activity
android:name=".SQLiteDemoActivity"
android:label="#string/title_activity_sqlitedemoactivity" >
</activity>
<activity
android:name=".CategorySmart"
android:label="#string/title_activity_categorylistsmart" >
</activity>
<activity
android:name=".CategoryAccessory"
android:label="#string/title_activity_categorylistaccessories" >
</activity>
<activity
android:name=".CategoryCasual"
android:label="#string/title_activity_categorylistcasual" >
</activity>
<activity
android:name=".CategoryFood"
android:label="#string/title_activity_categorylistfood" >
</activity>
<activity
android:name=".CategoryFootwear"
android:label="#string/title_activity_categorylistfootwear" >
</activity>
<activity
android:name=".CategoryGoingOut"
android:label="#string/title_activity_categorylistgoingout" >
</activity>
<activity
android:name=".CategorySport"
android:label="#string/title_activity_categorylistsport" >
</activity>
<activity
android:name=".TutorialVideo"
android:label="#string/title_activity_tutorialvideo" >
</activity>
<activity
android:name=".HelpGallery"
android:label="#string/title_activity_cameragalleryhelp" >
</activity>
<activity
android:name=".HelpFavourites"
android:label="#string/title_activity_favouritehelp" >
</activity>
<activity
android:name=".HelpColourPicker"
android:label="#string/title_activity_colourpickerhelp" >
</activity>
<activity
android:name=".HelpCategories"
android:label="#string/title_activity_categorieshelp" >
</activity>
<activity
android:name=".VideoGallery"
android:label="#string/title_activity_gallerytutorialvideo" >
</activity>
<activity
android:name=".VideoFavourites"
android:label="#string/title_activity_favouritestutorialvideo" >
</activity>
<activity
android:name=".VideoColorPicker"
android:label="#string/title_activity_colorpickertutorialvideo" >
</activity>
<activity
android:name=".VideoCategories"
android:label="#string/title_activity_categoriestutorialvideo" >
</activity>
</application>
</manifest>
It is possible the application is not compatible with your device or Android version running on the device itself.

Fix INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

After searching three hours on the web I couldn't find a solution for my app , I'm having an error that says : INSTALL_PARSE_FAILED_MANIFEST_MALFORMED .. Any Help ! by the way I tried to test it before and it works great !! Any suggestions ?
This is the Manifest file :
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" android:name="">
<activity
android:name="com.abdullahadhaim.itc.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>
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="com.abdullahadhaim.itc.Two"
android:label="#string/title_activity_two" >
</activity>
<activity
android:name="com.abdullahadhaim.itc.Three"
android:label="#string/title_activity_three" >
</activity>
<activity
android:name="com.abdullahadhaim.itc.Four"
android:label="#string/title_activity_four" >
</activity>
<activity
android:name="com.abdullahadhaim.itc.Five"
android:label="#string/title_activity_five" >
</activity>
<activity
android:name="com.abdullahadhaim.itc.Six"
android:label="#string/title_activity_six" >
</activity>
<activity
android:name="com.abdullahadhaim.itc.Seven"
android:label="#string/title_activity_seven" >
</activity>
<activity
android:name="com.abdullahadhaim.itc.Eight"
android:label="#string/title_activity_eight" >
</activity>
<activity
android:name="com.abdullahadhaim.itc.End"
android:label="#string/title_activity_end" >
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Looks like your manifest file is missing those lines :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.abdullahadhaim.itc"
android:versionCode="1"
android:versionName="1.0">
Try to add them, then clean-up the project and build it

Android XML File

I am trying to build a real estate app. I am having the following problem. I am trying to run this in the Android Studio but i seem to get error that I am missing a required attribute height and width. Could someone please tell me what I am doing wrong? I will be very thankful.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.estate"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:configChanges="keyboardHidden|orientation"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name="com.example.estate.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>
<!-- Registration Activity -->
<activity
android:name=".RegActivity"
android:label="User Registration" >
</activity>
<activity
android:name=".ScreenActivity"
android:label="Welcome::" >
</activity>
<activity
android:name=".NewPropertyActivity"
android:label="Post a property/holding" >
</activity>
<activity
android:name=".AllProductsActivity"
android:label="Available Properties" >
</activity>
<activity
android:name=".EditProductActivity"
android:label="Property Details" >
</activity>
<activity
android:name=".MessageActivity"
android:label="Talk to the Admin" >
</activity>
<activity
android:name=".ReadComments"
android:label="Property" >
</activity>
<activity
android:name=".AddComment"
android:label="Property" >
</activity>
</application>
<!-- Internet Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

Error parsing XML: not well formed(invalid token)- can't spot error

Can someone spot the error in my AndroidManifest.xml? To me I have all the tags correct.
I have checked the other questions but have not spotted anything. The X in eclipse is on the application start tag.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="***"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="18" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.msc.mymedisense.Welcome"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.msc.mymedisense.MainActivity"
android:label="#string/title_activity_main"
android:parentActivityName="com.msc.mymedisense.Welcome" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.msc.mymedisense.Welcome" />
</activity>
<activity
android:name=".AppSettingsActivity"
android:label="#string/title_activity_AppSettings">
</activity>
<activity
android:name=".NotificationActivity"
android:label="#string/title_activity_notification">
</activity>
<receiver android:name=".TimeAlarm" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>

Android: No Launcher activity found, no problems in Manifest

Here's my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fionaheiss.shovelshovel"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:label="DisplayMap"
android:name="com.seanheiss.shovelshovel.DisplayMap"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|orientation" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I've tried the "name" field as above and just as ".DisplayMap". It is definitely spelled correctly. Could it be because I'm using Slick2D? The file DisplayMap.java extends BasicGame from the Slick2D engine, and has a main method. Maybe it's not an actual activity or something, but I'm not sure.
Any ideas? Thank you very much!
You forgot to close the Activity tag:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:label="DisplayMap"
android:name="com.seanheiss.shovelshovel.DisplayMap"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|orientation" > // Also fix this here
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> // <-- here
</application>
Good Morning,
You have to close the <activity> tag after the <intent-filter>
<activity >
<intent-filter>
-------------------
------------------
</intent-filter>
</activity>

Categories

Resources