When I tried to upload signed application. Play store shows android manifest.xml.343 error getting 'android:label' value references does not exist. I checked AndroidManifest.xml and Strings line by line but unfortunately I didn't figure out.
For simulate same error locally. I run "./aapt dump badging myapp.apk" It shows same error.
Manifest file
<application
android:name=".MainApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:name,android:theme">
<activity
android:name=".settings.ui.MainBoardActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="#style/masterapp_core_theme.NoActionBar" />
<activity
android:name=".settings.ui.MASplashScreenActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
.........
</application>
Add below line inside <application> tag
android:label="#string/app_name"
After two day later I figure out how to approach the problem. First I found appt tool which is under the sdk/build-tools directory. When I run appt dump badging myapp.apk I saw label attribute value was empty. But problem was I have already defined it. To be sure I typed hardcoded value without referenced #string/name like that. But It doesn't solve.
Finally I compared changes in last month so problem was I defined string value at string.xml(tr) on the other module of project but I didn't define it on default string.xml. So aapt couldnt find references on default :)
Related
I am currently running into this issue without even knowing why.
It was working fine yesterday and I just added more code to each activity.
I have already perfomed "Invalidate Cache/Restart" and Restarted my computer.
Note that I did not change anything in the Manifest.xml nor have I added a new activity to the Project.
Here's the AndroidManifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".MainScreenActivity" />
<activity android:name=".StatisticsActivity" />
<activity android:name=".UnlockablesActivity"></activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
Any help would be greatly appreciated.
Edit: I have already tried to Rebuild and Clean multiple times. Same error.
The error is a little pop-up on the left corner saying "Error running app: Default Activity not found".
When setting the Default Activity in the settings to Nothing, this error appears in logcat when accessing a different activity.
It is not the full log but you can see that it references Line 25 in LoginActivity (the supposed Default Activity) which leads to its onCreate() function.
I've had exactly the same error a week ago, here's the link to my question. I couldn't find the origin of the error, it is probably a bug with Android Studio (I've had the same thing with all my projects).
I've resolved it by deleting the .AndroidStudio hidden directory in your user folder. Keep in mind, it deletes all the settings you've set before and it will reset Android Studio from scratch.
Screenshot of ErrorI am randomly getting an error when running my code. It was working a few hours earlier, but when I restarted my computer I can't run the code. I never changed my AndroidManifest, so I don't see why this error would occur. I tried rebuilding the project and invalidating the caches but it still doesn't work.
AndroidManifest.xml
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"/>
<activity android:name=".StartUpActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LogInActivity" />
<activity android:name=".SignUpActivity"></activity>
</application>
There is not error log all its says is "Default activity not found"
Also the red MainActivity says
"Unresolved class 'MainActivity' less... (Ctrl+F1)
Validates resource references inside Android XML files."
It's a long shot, but from the information that you've provided, I can say that I've had a degree of success doing the following:
File -> Invalidate Caches / Restart
It seems that you have a couple of errors there, and a little more information would make it easier to assist you (maybe show your full AndroidManifest.xml so that we can check other aspects of the file for errors).
1. Select Edit Configurations from the drop down next to run button.
2. Under launch options > Launch select Specified activity.
3. Another field "Activity" will appear select your default activity.
4. Click OK and sync project with gradle files and it should work.
I know there are many similar questions, but none of them fix my issue.
Firstly there is an error: Cannot resolve symbol 'R'. Also in the build tab, there is an error: Build: build failed. Over to the side of that, it says Manifest merger failed with multiple errors, see logs.
My program has two activities.
I have tried all the different things people said to try and they didn't work.
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dennisranish.wificontroller">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Controller"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Settings"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="landscape">
<intent-filter>
</intent-filter>
</activity>
</application>
</manifest>
In Merged Manifest tab:
Merging Errors:
Error: Missing one of the key attributes 'action#name,category#name,data#scheme,data#host,data#mimeType,data#port,data#path,data#pathPattern,data#pathPrefix' on element intent-filter at AndroidManifest.xml:25:13-26:29 app main manifest (this file), line 24
Error: Validation failed, exiting app main manifest (this file)
Update:
Your Settings Activity declaration should look like this:
<activity android:name=".Settings"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="landscape" />
This does fix the AndroidManifest.xml error. However Cannot resolve symbol 'R' is still and issue and in the build tab, there still is an error: Build: build failed. Except now over to the side of that, it now says AAPT2 error: check logs for details.
Also some people said to post the error logs and I was wondering: When I click Help > Show Log in Explorer is it the right log; because there are 12 logs all contain over 1000 lines
Thanks for any help and if any other file is needed please let me know.
Your error message is pretty clear:
Missing one of the key attributes
'action#name,category#name,data#scheme,data#host,data#mimeType,data#port,data#path,data#pathPattern,data#pathPrefix'
on element intent-filter at AndroidManifest.xml
Your Settings Activity has blank intent-filter, removing it will fix the issue.
If intent-filter is added, it must contain action tag and
can/cannot contain category and data tag, Reference Android
intent-filter doc
Your Settings Activity declaration should look like below:
<activity android:name=".Settings"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="landscape" />
Hope it helps!
I'm a beginner when it comes to both Java and android SDK, and I had some issues that I dealt with to finally be able to run my app, and than I get this error and I just can't figure it out.
So this is the Console:
[2013-09-17 19:59:23 - AndroidFlow] Installation error:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
[2013-09-17 19:59:23 - AndroidFlow] Please check logcat output for more details.
[2013-09-17 19:59:23 - AndroidFlow] Launch canceled!
(Sorry for text fragmentation, it doesn't fit in the same line)
And heres the logcat snap:
Also, heres the Manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.domiq.androidapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<service android:enabled="true"
android:exported="false"
android:isolatedProcess="false"
android:label="flow service"
android:name="com.domiq.androidapp.appservice"
android:permission="string"
android:process="string" >
</service>
<activity
android:name="com.domiq.androidappp"
android:label="androidapp" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Any suggestions? I've tried a lot of stuff (as you can see nothing is in capital letters etc...)
In the future, copy the text out of LogCat (select the lines, press <Ctrl>-<C> to copy) rather than use screenshots.
That being said, here are some obvious problems:
Your android:name in the <activity> is invalid, as it does not have the name of your Activity class.
The one that is causing your error is the android:process attribute in the <service> element, which is malformed and unnecessary.
I am skeptical that the android:name in your <service> points to a Service implementation class.
I strongly encourage you to get rid of android:isolatedProcess and android:permission, as what you have will probably not work the way you expect.
Are you sure your Activity's name is com.domiq.androidappp. This looks to be the package name.
So change below line to the Activity class Name. Use the Eclipse Manifest editor rather than adding manually
<activity
android:name="com.domiq.androidappp"
You need to remove the android:permission="string" and android:permission="string". It looks like you just copied pasted that incorrectly. You are supposed to replace "string" with the proper values.
Also your android:name under your Activity should be the Activity name, e.g. android:name="com.domiq.androidapp.MyActivity".
This is driving me nuts. I'm trying to upload a draft apk to the app store, I'm a windows developer, and this is my first android app, so I don't really have a frame of reference to work from. I export the signed apk, and from the developer console I browse to the apk, select it, and attempt to upload. I receive the message:
The file is invalid: ERROR getting 'android:name' attribute: attribute is not a string value.
I have uploaded this apk to the web, and can successfully download, install, and run the app outside of the market. I've self-signed the apk, and have verified that is done correctly.
Any suggestions would be appreciated.
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.My.PackageName"
android:versionCode="1" android:versionName="1.0.0">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".Home" android:configChanges="orientation"
android:label="#string/app_name" android:launchMode="standard" android:icon="#drawable/icon">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Preferences" android:label="#string/set_preferences"> </activity>
<activity android:name="com.admob.android.ads.AdMobActivity"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboard|keyboardHidden"
/>
<meta-data android:value="myValue" android:name="ADMOB_PUBLISHER_ID" />
<meta-data android:value="true" android:name="ADMOB_ALLOW_LOCATION_FOR_ADS" />
</application>
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>`
A missing label attribute on an Activity declaration will not be the reason for aapt debug badging to fail! You can leave them out of your Activity declaration without issues.
A common cause for these failures is a string resource that is declared in one of the translated resources while missing in the non translated, main resource folder.
res
values
strings.xml <-- missing declaration here
values-it
strings.xml <-- of a string declared here and used in manifest as a label
run the aapt command from the /path/to/sdk/build-tools folder to find more information about this error:
aapt debug badging /path/to/apk
Looks like you forgot to set the name attribute or gave an invalid one in the AndroidManifest.xml
I just had the same issue. Found the problem - I'd missed the label from one of my activity declarations. In your case, looks like the 3rd activity.