I am an experienced Java programmer just starting out with Android development. I am going through the tutorials and am having a problem with the tab widget tutorial. I have followed the example to the letter and keep getting the below in the log when trying to run on the emulator:
ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.android/.HelloTabWidget }
ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android/.HelloTabWidget } from null (pid=-1, uid=-1) requires null
I have searched the internet forums for the last three hours and can't find any answers to what is going on. The tutorial I am using is here: http://developer.android.com/resources/tutorials/views/hello-tabwidget.html. I am using jre 1.6, and Android platform 2.1. Any help will be appreciated. I can't tell you how frustrating it is when you follow a supposed simple example and you can't get it to work.
If you are still having issues and you have tried all that is mentioned above...
Last try is:
Make sure your target SDK and ADT matches the required SDK and ADT version...This will surely help. My project is looking for API 8 and I have API 14. So I have installed API 8 version with ADT8.X version...
Without having done this particular tutorial, I'll say that the main reason for permission denial errors in Android in my limited experience is failure to declare necessary permissions in the AndroidManifest.xml file. I'm not sure that this is the case here though.
This may be a red herring, but the name of your application doesn't look right. It looks like you've named it as if it's an android system application (the package prefix "com.android" I've only seen with regard to Android system apps). Maybe if you tried putting something other than "com.android" for the package field in your project this might help, because it could be that the namespace is protected.
Related
I have a Xamarin for Android app that has been working until today. I needed to make a change but before I did, I ran a test to ensure no VS or Nuget package updates caused an issue. I have Xamarin.Essentials in my app and this line worked before, not sure what is happening now.
if(DeviceInfo.Model == "TC72"){scannerIndex = 1;}
Exception Unhandled:
Xamarin.Essentials.NotImplementedInReferenceAssemblyException: 'This
functionality is not implemented in the portable version of this
assembly. You should reference the NuGet package from your main
application project in order to reference the platform-specific
implementation.'
Any insight would be helpful. TIA
I changed the DeviceInfo.Model to Build.Model and get the same info I was expecting. That fixed my issue. If anyone has a different suggestion, happy to entertain them.
Added 8/11/21 3:25pm CT
I also found that changing my Compile Target to 10.0 fixed the Xamarin.Essentials issues. So far the application is working on 8.1 on the device (Zebra MC3300).
When my app checks for obb expansion file it crashes, giving the following error:
Service Intent must be explicit: Intent { act=com.android.vending.licensing.ILicensingService } - Error.
I know that this exact issue was a problem on Android 5.0+ and it was solved as follows:
https://code.google.com/p/android-developer-preview/issues/detail?id=1674
However, this is happening again on android 6.0+ now. And that fix is not working for 6.0+.
Any idea how to solve this?
I am having an issue with sqlite db in Android. But as I made a quick research on the internet, I suspect that the problem is not related to sqlite but system user. My app is not recognized as authorized user to access db functionalities. I tried to apply possible suggested solutions in stack overflow but none of them made a difference. This is the LogCat I am facing every time I attempt to use db functionality.
12-14 02:35:17.721 2953-3355/? E/DatabaseUtils﹕ Writing exception to parcel
java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13082)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:577)
at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
at android.os.Binder.execTransact(Binder.java:388)
at dalvik.system.NativeStart.run(Native Method)
I tried to add permission
android.permission.INTERACT_ACROSS_USERS_FULL
but still no sound. The strange thing is when I try to add INTERNET permission Android Studio 0.3 (ide I use) suggests me possible permissions I can choose. But when it comes to INTERACT_ACROSS_USERS_FULL permission it behaves like it has no idea about this permission. My test device is Samsung S4 running on 4.3.
I assume that I am not the only one who tries to use db on android. So there is a solution.
How can I really add INTERACT_ACROSS_USERS_FULL permission to my application?
According to this answer: android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.
Which is not something you can achieve unless you either are the creator or the system build, or collaborating with them such that they are willing to sign your apk with their certificate. In other words, this is off limits for most developers.
I got the error android.permission.INTERACT_ACROSS_USERS_FULL because I had some conflicts in the bin directory of the project. I did some changes to the my app package id and the app-file-1.apk in the bin directory doesn't match with the project.
I did a project > clean and checked that the bin folder was cleared and regenerated, and it works now.
I had the same issue and think that I can help you out. I had registered my app with my production keystore, but was using Eclipse debug to load it into my phone. The Eclipse debug uses debug.keystore which wont match the signature of your production key and throw this error. Use the debug keystore instead for testing or send the apk to yourself and download it onto your phone.
I get this error when I change my minSdkVersion from 8 to 11 in my Manifest. I changed it back to 8 or 9 and no more error.
Try changing your minSdkVersion in your manifest. I was able to repeat the crash and error results with versions 10, 11, and 12 (my app crashes and displays "requires android.permission.INTERACT_ACROSS_USERS_FULL" in the LogCat)
Try to disable auto-fill. It works 100% on Android Oreo. Check this link
Simply add this code to your app :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.decorView.importantForAutofill =
View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS;
}
I am working on integrating micode's open source compass into an app I am making. I am wondering how I can fix this here permission error when I clearly have it stated in my manifest with the correct spelling. Its still coming up that I need that permission.
This is puzzling me...
11-03 13:53:58.241: E/AndroidRuntime(8975): Caused by: \
java.lang.SecurityException: Permission Denial: registerReceiver from \
net.micode.compass asks to run as user -1 but is calling from user 0; this \
requires android.permission.INTERACT_ACROSS_USERS_FULL
android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.
I had a same problem and i did project -> clean. It works now.
I know there is already an accepted answer but for some reason its not working (or no longer working) on my part.
This error happened to me on Android SDK version 19 and lower, because of NDK that was part of my app.
I just deleted few codes that are connected with NDK codes at the Android Manifests file.
I disabled autofill and project started to work normally. Check this link
Just add this code to your app :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.decorView.importantForAutofill =
View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS;
}
When trying to run my application on the emulator I get an error from the activitymanager:
ActivityManager: Error type 3
My activity exists, is listed in the manifest (in fact, its the MAIN launcher activity).
Anyone know what this error means?
If you are running Eclipse try Projects-->Clean... and clean the project before running again.
i faced the same issue. I cleaned the project and removed the android:enabled=false in android manifest. This solved the issue.
Check "android:installLocation" in your AndroidManifest.xml.
"preferExternal" will cause the problem.
I got this error because I used invalid characters in my project name and Android didn't warned me about it so I had no idea that was the problem...
Example: "Thís ís íncorrect!"
nothing to worry about that it happens sometimes when activity manager unable to find activity of your app that means your target that is emulator is not started yet or may be because of following reason:
when you try to run your app on emulator you may be cancled in between building or forcefully closed your emulator.In that case when try to start emulator again it will sometimes not maximized.
now you have to restart your eclipse and then launch emulator and run your app now you will not face this type of error
Dont remember how I fixed this - most probably I wiped the local copy and re-checked out of svn.
ActivityManager: Error type 3
I don't know how true it is, but I used the same shared preferences file from another app..and got this error. I chose a new name for the shared preferences and the problem has gone away. It's working now
I had not enough space on my phone, that's why I had this problem.
So I cleaned it and go RUN )
I got this error when I mistakenly added a second application tag in my manifest as I was trying to add hardware acceleration to my app:
<application
android:hardwareAccelerated="true" />.
I added it above my actual application tag and I think this resulted in Android deploying an empty 'app' to my phone. It reported 'Installation success' in the logs and yet there was no launcher icon. It did appear, though, under Settings -> Apps but the only thing I could do there was to uninstall it. Hope this helps someone.
Thus, it seems there can be many reasons to see this error.
For those who can't fix it using the above mentioned methods:
In my case, i renamed the name of my activity (using F2 in Eclipse) and it is fixed.