I receive the following error in logcat when app crashes:
The app's package name is com.todo.quickcards
Somehow the RebootReceiver and RebootService classes have a reference to an old package name (see yellow highlights where the package name says "com.wimso.v118.RebootReceiver" and "com.example.jdw.v118/com.wimso.v118.RebootService). The logcat error suggests the BIND_JOB_SERVICE permission is needed in RebootService class but the Android Manifest already has that permission added for the RebootService:
AndroidManifest.xml
...
<service
android:name="com.todo.quickcards.RebootService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false"
android:description="#string/rebootservicedesc" >
</service>
How can I remove the erroneous, old package name reference and have Android Studio reference the current com.todo.quickcards package name for the RebootReceiver and RebootService classes?
Turns out the issue was that I had an earlier version of the app on my device and that version did not have the android:permission="android.permission.BIND_JOB_SERVICE" in the Manifest. So when the device was re-booted the Receiver and Service in the earlier version app were generating the permission error. I updated the earlier version app with the BIND permission and no errors were generated.
Related
Error:
adb: failed to install C:\Users\legion\Desktop\nojoum-application\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl764320653.tmp/base.apk (at Binary XML file line #79): com.ryanheise.audioservice.AudioService: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
Error launching application on sdk gphone64 x86 64.
This is my error log:
Please add the
android:exported="true"
to your Main Activity's activity tag in the AndroidManifest.xml file, like this:
Open Your Project's Android manifest, located at android/app/src/main/AndroidManifest.xml
Go to this line: android:name=".MainActivity"
Below this line, add android:exported="true"
The code should now look like this:
android:name=".MainActivity" // this must be the main activity
android:exported="true"
android:launchMode="singleTop" // this line can be something else, no worries
Explanation
What this does is that it tells Android to make this activity available to be accessed by another app, so that it can open your App. As the launcher (the app drawer/home screen) can be a normal app in android, the Main Activity must be exported to allow it to launch your app.
Go to android/app/src/main/AndroidManifest.xml and paste android:exported="true" after android:name=".MainActivity" like this:
I would like to build the game in android 12. I know I need to add the android:exported="true" into activity tag which included intent-filter.
So I already added the android:exported="true" into activity tag in my AndroidManifest.xml. But I built on the android 12 device is still has error.
Installation failed due to: 'Failed to commit install session 1567366667 with command cmd package install-commit 1567366667. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1567366667.tmp/base.apk (at Binary XML file line #136): com.unity.purchasing.googleplay.VRPurchaseActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'
But I don't know what is VRPurchaseActivity and I don't add this activity to my AndroidManifest.xml.
So anyone know how to fix this issue. Thank a lots.
The activity comes from Unity but there is a way to override its attributes. Put this inside your manifest:
<activity android:name="com.unity.purchasing.googleplay.VRPurchaseActivity">
android:exported="false"
tools:node="merge" />
I am working on a android VOIP Dialer. I unable to install my current app along with old app in a device.
01-07 12:05:05.115: E/Finsky(28214): [1] PackageInstallerImpl$2.onReceive: Error -505 while installing com.current.app: INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.current.app attempting to redeclare permission android.permission.CONFIGURE_SIP already owned by com.old.app
the permission in manifest.
<permission
android:name="android.permission.CONFIGURE_SIP"
android:permissionGroup="android.permission-group.COST_MONEY"
android:protectionLevel="signature" />
I have tried protectionLevel both signature and dangerous.
How can I solve this issue.
It seems you are trying to declare same permission in two applications.
In order to keep both application installed, common solution for this problem is to use a dynamic prefix for your permission, preventing conflicts with other apps (as it happens for GCM configuration too):
<permission
android:name="${applicationId}.permission.CONFIGURE_SIP"
android:permissionGroup="${applicationId}.permission-group.COST_MONEY"
android:protectionLevel="signature" />
Be careful to have applicationId value assigned in your Gradle configuration under android > defaultConfig.
I have seen a few similar posts to this, but i already have had the ContentProvider registered in my AndroidManifest.
I have a ContentProvider called MyContentProvider.
And MyContentProvider is located in a library project called MyProject. With package location personal.mobile.abc.angry.tiger.MyContentProvider.
My AndroidManifest for this project looks like this (left out info that is not related):
<application
android:label=...
android:icon=...
android:theme=...>
<provider
android:name="personal.mobile.abc.angry.tiger.MyContentProvider"
android:authorities="personal.mobile.abc.angry.tiger">
</provider>
</application>
Lint keeps saying this:
The <provider> personal.mobile.abc.angry.tiger.MyContentProvider is not registered in the manifest.
And Logcat says this when attempting to run the application that includes the library that contains the ContentProvider:
Failed to find provider info for personal.mobile.abc.angry.tiger
What am i doing wrong? What is the issue?
If you need any further information, please let me know.
Thanks!
Your <provider> element needs to be in the application, as it is the one with the ContentProvider. The fact that the Java class implementing that ContentProvider happens to be in an Android library project does not change the fact that the hosting app is the one responsible for that provider.
Eventually -- perhaps as soon as ADT 21 -- your <provider> element in the library project can be automatically added to your application project. Right now, AFAIK, that process is manual.
I installed the new android ADT and now I see warnings about exported services defined in the AndroidManifest that do not require a permission.
The problem is that the services are related with the sync adapter. In the SampleSyncAdaapter there are no required permissions either but I do not see that warning.
Which permission should I define for the sync adapter?
I have the same problem for the service that handles CLEAR_MISSED_CALLS.
You are getting that warning because you are exporting the service with no permission restrictions. In your <service> declaration, make the permission android:permission="your.app.name".
Example:
<service android:name=".ClassName" android:permission="your.app.name"></service>
For a more detailed explanation, have a look here.