AndroidManifest.xml issues - General Questions and Answers

Alright I used this same AndroidManifest.xml code several times to create my app and it worked just fine now I'm getting 5 different errors and I can't figure out why.
Here's the xml code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="technologx.technologx"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<meta-data
android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAILe2cCZXNBhacXv2fkMpNM5F7FWTdWRUw-r1dFg" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="technologx.technologx.SplashScreen"
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="technologx.technologx.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="technologx.technologx.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Here's the errors I"m getting every time I try to create the apk:
Code:
Error:(27, 24) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(28, 24) No resource found that matches the given name (at 'theme' with value '@style/AppTheme').
Error:(31, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(40, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:Execution failed for task ':app:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/knye1991/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
Could someone possibly help me fix my issue please?

Related

[Q] Edit AndroidManifest.xml to Remove Ads

Hi, if I remove this lines (RED) from AndroidManifest.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="1" android:versionName="1.0" package="com.strek.whistle.dog"
xmlns:android="xttp://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="3" />
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:theme="@android:style/Theme.Light.NoTitleBar" android:label="@string/app_name" android:name=".DogWhistleActivity" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
[COLOR="red"] <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />[/COLOR]
</application>
[COLOR="Red"] <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />[/COLOR]
</manifest>
would that be enough to get rid of ads?
Cheers!!!
Are my question stupid?
Anyone!
You can patch host file in /system/etc/hosts
dhruv.always said:
You can patch host file in /system/etc/hosts
Click to expand...
Click to collapse
thanksssssss
dhruv.always said:
You can patch host file in /system/etc/hosts
Click to expand...
Click to collapse
Thank you for this but you gave me the fish and I want to learn fishing!
Look like I am going to delete those 3 lines, compile and see will app crush...
Cheers!!!
Ads added to an app by the developer are there so the app can be free and the developer doesn't have to make paid only apps to support the time needed to make the apps. If you don't want the ads then use a modded host file.
XDA is a site focused on developers so we will not help you remove the things they need to keep developing.
Thread closed

Broadcasted intent not being received by system app

Posted this on stackoverflow but got no response so I'm trying here.
I have a BroadcastReciever in a system app that I want to send an Intent to (for testing purposes as I'm modding that system app).
The AndroidManifest.xml of the system app looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="15" android:versionName="4.0.4-I9300XXALF6" package="com.sec.android.contextaware"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BROADCAST_PACKAGE_REMOVED" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.DUMP" />
<application android:label="@string/app_name">
<receiver android:label="StateReceiver" android:name=".abstractor.StateReceiver" android:enabled="true" android:exported="true">
<intent-filter>
<action android:name="com.sec.android.contextaware.HEADSET_PLUG" />
<action android:name="android.intent.action.LOCALE_CHANGED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<provider android:name=".manager.LoggingDataProvider" android:authorities="com.sec.android.contextaware.manager.LoggingDataProvider" />
</application>
</manifest>
I use a test app and check if the target system app indeed can receive that intent with:
Code:
Intent intent = new Intent();
intent.setAction("com.sec.android.contextaware.HEADSET_PLUG");
PackageManager pm = getPackageManager();
for (ResolveInfo resolveInfo : pm.queryBroadcastReceivers(bt, 0)) {
Log.d("APP: ", resolveInfo.toString());
}
and get back a `ResolveInfo` with the system app's info, so it should be able to receive the intent. I then broadcast the intent with:
Code:
sendBroadcast(intent);
However nothing happens, the intent is not received. I have full control of the target system app's manifest file and code. Is it possible to somehow get the intent across?
Device is rooted.

Multiscreen

What app, jar, or xml controls the multiscreen. Trying to get something to work and need to know what dictates the split screen on a few apps.
It's in the AndroidManifest.xml file.
You need to add this to the xml:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
And this before closing the application tag:
<uses-library required="false" name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
</application>

Create Settings shortcut for Settings$RunningServices

Hi all,
i'm going to extend the existing Settings shortcut widget in Android Nougat with "Running services", which actually can be launched under Settings -> Developer options.
I found following two sections in packages/apps/Settings/AndroidManifext.xml:
Code:
<activity-alias android:name=".RunningServices"
android:label="@string/runningservices_settings_title"
android:exported="true"
android:targetActivity="Settings$ManageApplicationsActivity">
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.ManageApplications" />
</activity-alias>
<activity android:name="Settings$RunningServicesActivity"
android:label="@string/runningservices_settings_title"
android:taskAffinity="com.android.settings"
android:parentActivityName="Settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY" />
<category android:name="android.intent.category.VOICE_LAUNCH" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.ManageApplications" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
and deleted the activity-alias part and changed the activity part to this:
Code:
<activity android:name="Settings$RunningServicesActivity"
android:label="@string/runningservices_settings_title"
android:taskAffinity="">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="com.android.settings.SHORTCUT" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.RunningServices" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
I know that there will be a shortcut after building Android, but the last two times i tried it with other changes i ran into RuntimeException. Will this be the right part?
Kind regards
Pat
I know this thread is ancient but it appears on google search results so I thought I would post something I found that works:
Code:
am start -n com.android.settings/.SubSettings -e :settings:show_fragment com.android.settings.applications.RunningServices
This works for android 9 but needs to be run as root.
garbb said:
I know this thread is ancient but it appears on google search results so I thought I would post something I found that works:
Code:
am start -n com.android.settings/.SubSettings -e :settings:show_fragment com.android.settings.applications.RunningServices
This works for android 9 but needs to be run as root.
Click to expand...
Click to collapse
Thanks for posting. It's members like you that make xda great

Question Sbh 52 problem with calling help

Sbh 52 problem with calling from handsfree....it doesnt call at all....when i installed sbh 52.apk a warning came up telling me that this apk is for older android version....i know that is the problem i dont know what can i do to fix it...all the other function wotk properly...i have just unlocked bootloader and installed crdroid....if anyone can help i will be gratefull....thanks in advance
update it can make calls from th e bluetooth device only if i have the screen on and opened the application of sbh52 .....when i lock the screen i cannot do anything,no calls no messages
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="10023"
android:versionName="1.0.23"
package="com.sonymobile.smartconnect.raphael">
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="17" />
<uses-permission
android:name="android.permission.READ_CONTACTS" />
<uses-permission
android:name="android.permission.BLUETOOTH" />
<uses-permission
android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission
android:name="android.permission.VIBRATE" />
<permission
android:label="@ref/0x7f060008"
android:name="com.sonyericsson.extras.liveware.aef.HOSTAPP_PERMISSION"
androidrotectionLevel="2" />
<uses-permission
android:name="com.sonyericsson.extras.liveware.aef.HOSTAPP_PERMISSION" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="android.permission.READ_CONTACTS" />
<uses-permission
android:name="android.permission.CALL_PHONE" />
<uses-permission
android:name="android.permission.READ_CALL_LOG" />
<uses-permission
android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<application
android:theme="@ref/0x7f0a000c"
android:label="@ref/0x7f060001"
android:icon="@ref/0x7f020011"
android:name="com.sonymobile.smartconnect.raphael.RaphaelAha"
android:debuggable="false"
android:allowBackup="true">
<activity
android:theme="@ref/0x7f0a000b"
android:name="com.sonyericsson.j2.AhaActivity">
<intent-filter>
<action
android:name="com.sonymobile.smartconnect.raphael.LAUNCH" />
</intent-filter>
</activity>
<service
android:name="com.sonyericsson.j2.AhaService" />
<activity
android:name="com.sonymobile.smartconnect.headsetaha.preferences.HeadsetHomeActivity"
android:launchMode="2">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<action
android:name="com.sonyericsson.extras.SETTINGS" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.sonyericsson.j2.preferences.DebugPreferences" />
<activity
android:theme="@ref/0x7f0a000b"
android:name="com.sonyericsson.j2.fota.FotaActivity"
android:screenOrientation="1" />
<activity
android:theme="@ref/0x01030055"
android:name="com.sonyericsson.j2.lwm.LwmUpgradeActivity"
android:screenOrientation="1" />
<activity
android:name="com.sonymobile.smartconnect.raphael.preferences.RaphaelExtensions" />
<activity
android:name="com.sonymobile.smartconnect.raphael.preferences.MultiSingleMasterPreferences" />
<activity
android:name="com.sonymobile.smartconnect.raphael.preferences.RaphaelAccessorySettings" />
<activity
android:name="com.sonymobile.smartconnect.headsetaha.preferences.HeadsetFirmwarePreferences" />
<activity
android:name="com.sonymobile.smartconnect.headsetaha.preferences.HeadsetUsageTips"
android:screenOrientation="1" />
<activity
android:name="com.sonymobile.smartconnect.headsetaha.preferences.SpeechEnginePreferences" />
<activity
android:name="com.sonymobile.smartconnect.headsetaha.preferences.ExtensionPreferences" />
<activity
android:name="com.sonymobile.smartconnect.headsetaha.preferences.CallHandlingPreferences" />
<activity
android:name="com.sonymobile.smartconnect.headsetaha.preferences.TtsPreferences" />
<activity
android:theme="@ref/0x7f0a000b"
android:name="com.sonymobile.smartconnect.headsetaha.tts.TtsCreator" />
<service
android:name="com.sonymobile.smartconnect.raphael.call_log.RaphaelCallLogService" />
</application>
</manifest>
thats the manifest inside the apk ....i dont know how and where to start .....thanks in advance for any help

Categories

Resources