Questions tagged [android-manifest]

The manifest presents essential information about the application to the Android system

Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, information the system must have before application can be installed and run any of the application's code.

See AndroidManifest.xml permissions

6006 questions
46
votes
5 answers

How to set my Activity as main activity in android?

I want to create own activity as main activity rather than using default MainActivity. How can I define that in android manifest?
Sathish
  • 1,147
  • 3
  • 10
  • 20
46
votes
7 answers

adjustPan not preventing keyboard from covering EditText

I'm trying to create a pretty basic chat screen with a ListView displaying the text and an EditText at the bottom and a "Send" button to the right of the EditText. Everything is functional, but when I click the EditText, the virtual keyboard covers…
honeal
  • 1,700
  • 2
  • 13
  • 15
45
votes
23 answers

android:exported added but still getting error Apps targeting Android 12 and higher are required to specify an explicit value for android:exported

I have added android:exported="true" to my only activity in manifest but still getting below error after updating compile sdk and target sdk version to 31.I also tried rebuilding the project , invalidating cache and restart but that didn't…
45
votes
8 answers

Android Studio 3.0 Manifest Error: unknown element found

NOTICE: Please do not post this "android.enableAapt2=false" as an answer. It is not a solution. It is just ignoring the real error which is not causing any problem on runtime. Solution was simple, just removed mistakenly placed action tag outside…
Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52
45
votes
5 answers

Create System Application

What I should to do to create a system app (to obtain rights to use android:sharedUserId="android.uid.system"in manifest file without receiving an error from package manager about certification problem? I use rooted phone with stock firmware.
Michał Rowicki
  • 1,372
  • 1
  • 16
  • 28
45
votes
4 answers

Android: automatically choose debug/release Maps v2 api key?

I'm using Google Maps v2 API in my project. In Google Maps v2 the debug/release API key is defined in AndroidManifest.xml. I have seen the link but in that map key is defined in a xml layout file not in AndroidManifest.xml. So can I define both…
44
votes
4 answers

Using the new "manifestmerger" property in Android

In the newest version of ADT (version 20 preview 3), they say that it's possible to make the libraries' manifest file become mergeable with projects that use them: Automatic merging of library project manifest files into the including project's…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
43
votes
3 answers

Get rid of "Exported service does not require permission" warning

I'm looking for a solution to get rid of the warning. I don't understand even why it appears. I took a look at a SDK example where no warning appears. At first here is my manifest where I get the warning Exported service does not require…
rekire
  • 47,260
  • 30
  • 167
  • 264
42
votes
10 answers

Is there any way to have one and only one instance of each activity?

I'm finding that in my application, the user can get quite 'nested' in the various activities that are opened while the user is using the application. For example: Main Menu Object List Object Details Object Edit Object Details Object Child…
Cody
  • 8,686
  • 18
  • 71
  • 126
42
votes
6 answers

Android open pdf file

I'm developing an Android application and I have to open some files. This is my code using intent: public class FacturaActivity extends Activity { (...) public void downloadInvoice(View view) { File file = new…
Lyd
  • 2,106
  • 3
  • 26
  • 33
41
votes
12 answers

Android error "unable to find explicit activity class"

I have an android project with several packages. The structure of the packages in this case is com.WAPP.SetLocation is the package that contains the activity I want to run. In my manifest, com.WAPP is considered the base package:
Johnny Rocket
  • 1,394
  • 3
  • 17
  • 25
41
votes
3 answers

Detect my app's own android:versionCode at run time

Is there a way for my app to know the android:versionCode from AndroidManifest.xml or do I have to create a separate constant in one of my classes?
700 Software
  • 85,281
  • 83
  • 234
  • 341
41
votes
6 answers

SearchView hint not showing

I'm trying to display hint text in a search view in my Main Activity. The onqueryTextSubmit launches another activity called SearchResultsActivity which will display the results of the query. My problem is that I cannot display the hint text. My…
yian.athanasiadis
  • 527
  • 1
  • 5
  • 6
41
votes
3 answers

Warning: Exported activity does not require permission

I recently created a project and added a splash and a main activity. I edited the manifest file and added the splash activity and the main activity in to it. After adding the main activity, it gives me a warning "Exported Activity Does not Require…
Imesh Chandrasiri
  • 5,558
  • 15
  • 60
  • 103