Pathproblem in android-manifest? - android

I'm extending Application. In another test, where everything was in the same package, everything went well. Now, I do have multiple packages and the app crashes. I guess, I miss something about the path in the manifest?
<application
android:name=".MyInheritedApplication"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
Any hints appreciated!
Thanx, Marcus

Make sure that your package-attribute in the manifest-tag is set correctly.
Example
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.demo.android"
... >
</manifest
Every application has his own name-attribute that will use this package to build up its path.

Related

No resource identifier found for attribute 'fullBackupContent' in package 'android'

part of my AndroidManifest.xml
<application
android:allowBackup="true"
android:fullBackupContent="false"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppThemeCompat"
android:largeHeap="true" >
I'm newbie in android developer, i use eclipse mars with sdk 25.1.3 and i get this error. they are no '/xml' folder under 'res/' in my project.
what should i do to fix this issue?
sorry for my english.
Does your manifest tag look like this?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.my.appexample">
I never used "fullBackupContent" but every attribute needs to be declared with the xmlns to use it.
Also, if you say you are new to android development. Why do you need "fullBackupContent" and "largeHeap"? Did you copy that from somewhere or is it on purpose?

Error while fetching http://schemas.android.com/apk/res/android

Ok so I was going through a tutorial online, then when i tried to change my build.gradle file to compileSdkVersion 21 instead of 23 everything lost the plot and now all my previous projects etc are all showing errors.
In the AndroidManifest.xml the 2 http lines and all the android: are all red and the the activity opening tag has a red squiggly line under it also. I have zero idea what i have done wrong! Almost like internet has gone? Just a noob so i have no idea please help!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/tools"
package="com.site.project" >
<application
android:allowBackup="true"
android:icon="#mipmap/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>
</application>
</manifest>
This answer extends #adelphus'.
A new app\build\intermediates\manifests\full\debug\AndroidManifest.xml would have listed these errors. Close and reopen the AndroidManifest.xml file from the project pane under app > manifests.
Hope this works for you.
You have duplicate schema definitions for the xmlns:android namespace in your manifest file - only one schema per namespace is allowed and I suspect the compiler is getting confused by the duplicate entry.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/tools"
package="com.site.project" >
should be:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.site.project" >
The namespace schema definitions are important - they are used to define attribute prefixes. Because your duplicate entry is invalidating the android namespace, all attributes prefixed with android: will be wrong - this is why all the android: attributes have an error (red line) displayed.
Alternatively, just remove the tools namespace completely if you're not using any attributes with the tools: prefix in your manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.site.project" >
you need download jdk here "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
then go to File > Project Structure > here you config path jdk default C:\Program Files\Java\jdk-11.0.2 . Hope this works for you
I think you have two AndroidManifest.xml files to change it. Just rename the debug AndroidManifest.xml and that solution works for me.
Search for the AndroidManifest.xml file(s). on the project ParentPath. if there are multiple, keep one and delete the others.(usually find many other)

Android Google Analytics - adding to which xml?

I was instructed to add the following to some file but not sure which one, please help me.
Mark application entry – Manifest
Add Analytics as application name on Manifest entry as below :
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:name=".Analytics">
but my current project manifest already have the following:
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
What should it become now?
This means you have Analytics application class in your app
android:name=".Analytics"
will consider as your application base class.
for more info please refer this link http://developer.android.com/reference/android/app/Application.html
Assuming you are using SDK v4, use the link
The documentation is very straight forward so you shouldn't have any issues integrating it.

Android. No Launcher Activity found

I keep getting this message when trying to run the emulator, even though I've put the launcher activity in my manifest.
Does anyone have an idea what I'm doing wrong?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.libsdl.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="org.libsdl.app.SDLActivity"
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>
Resolved: After some more mucking around in my files, I found that there were multiple AndroidManifest.mk files and I had put the activity in the wrong one. (I had this in the mk file located in the bin folder, instead of the one in root.)
I was having this same issue, and the OP's edit at the bottom of the post was what fixed it. (I would have upvoted, but I do not have any reputation points at this time).
To clarify for anyone in the future: it appears that Eclipse will automatically create a duplicate of the AndroidManifest.xml in the bin directory. This copy is automatically generated off of the one you are supposed to edit on the root directory.
If you edit the manifest in the bin directory, Eclipse will not give you any warning that you are editing the wrong file. You can even save to it, and run validate to ensure that there are no errors. When you run the program, it will actually be overwritten, but for some reason Eclipse tends not to prompt you that the contents have been overridden while you still have the file open.

Modfiying Android Manifest

So I have been following a tutorial titled 31 days of Android. I am having an issue with one of the tutorials. It calls for me to modify the androidmanifest.xml file but when I do but it doesn't work. Everytime I run the application it crushes after I press button 2. Here is the code they wanted me to add
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:name="MyApplication">
and here is the code looks after I have added that code to my file.
<application android:icon="#drawable/icon" android:label="#string/app_name" android:name="MyApplication">
I did not add the android:icon="#drawable/ic_launcher" because it gave me an error which read "no resoucre found that matches the given name". Any help would be appreciated.
The error is because there is no icon in your project,
Look in Project/res/drawable/ ...
The ic_launcher is the default icon, so just replace
android:icon="#drawable/icon"
By :
android:icon="#drawable/ic_launcher"

Categories

Resources