Android XML File - android

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>

Related

Unable to find activity,have you declared in manifest

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

Android Manifest . The markup in the document following the root element must be well formed

I have looked through other questions regarding the same problem but was unable to find a helpful solution. Here is my xml . What is wrong with it?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.projextxy"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<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>
<activity
android:name=".LogInActivity"
android:label="#string/title_activity_log_in"
android:parentActivityName="com.example.projextxy" >
</activity>
<activity
android:name=".SignUpActivity"
android:parentActivityName="com.example.projextxy"
android:label="#string/title_activity_sign_up" >
</activity>
</application>
You missed the last manifest tag </manifest> after your application tag
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.projextxy"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<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>
<activity
android:name=".LogInActivity"
android:label="#string/title_activity_log_in"
android:parentActivityName="com.example.projextxy" >
</activity>
<activity
android:name=".SignUpActivity"
android:parentActivityName="com.example.projextxy"
android:label="#string/title_activity_sign_up" >
</activity>
</application>
</manifest>

Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED any suggestions

** everyone with the same question has specific problems none of the have worked for me i've had more problems making this project than any other i've had.**
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.BinaryRelics"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="20" />
im pretty sure that the problem is somewhere between here and my last intent filter line
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Homescreen"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.BinaryRelics.Arcademode"
android:label="#string/title_activity_arcademode"
android:parentActivityName="com.BinaryRelics.Homescreen" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.BinaryRelics.Homescreen" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data>
</meta-data>
</activity>
</application>
</manifest>

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

launch errors fail to install

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bpi.mygears"
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" >
<activity
android:name="com.bpi.gears.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.bpi.gears.home"
android:label="#string/title_activity_home" >
</activity>
<activity
android:name="com.bpi.gears.profile"
android:label="#string/title_activity_profile" >
</activity>
</application>
</manifest>
this is my manifest feel free to check it and tell me where im wrong i would help a lot if you need to see all i can show you all my project has no error so im having a difficult time finding where im wrong...
I think you have some problems with your naming. Your package name is "com.bpi.mygears" and you are looking for activities that are com.bpi.gears. Your activities can just be named relative to the package. It should probably be more like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bpi.mygears"
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" >
<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>
<activity
android:name=".home"
android:label="#string/title_activity_home" >
</activity>
<activity
android:name=".profile"
android:label="#string/title_activity_profile" >
</activity>
</application>
</manifest>
Assuming your stuff is in com.bpi.mygears. Otherwise, make that first line
package="com.bpi.gears" if your stuff is in gears.

Categories

Resources