Android Studio - PocketModeLiteSensor Error - java

I have a problem that I've already described on StackOverflow but still can't solve - Suddenly LogCat stopped working for me - I have no idea why! As soon as I click "Debug" in Android Studio and the app installs on my phone the only error I get in LogCat Tab is E/SensorsHub: PocketModeLiteSensor :input data file descriptor not available - (Bad file descriptor) The worst part is that there is no mention of it on Google! As if no one has had this problem yet!
I'm really asking for help - I've already reinstalled Android Studio, reset my computer, and created a new empty project in which this problem also occurs.
Edit 1:
I poked around a bit on Google - is this error literally telling me there is an error with my sensors? Recently my gyroscope stopped working i.e. I checked with the app that it works but the phone doesn't rotate the screen automatically even when I have auto rotate enabled.

Related

My app tells me that it need google play store while using avd

Today, I've got strange problem, that I've never faced before. It happened after I've discovered that (I really don't know how) I've got an old code in my android studio (like commit or two from my last one) I've commited some code in friday or so. Today I've saw lack of code in some of my classess, so I did some update (blue arrow pointed down-left in android studio) and I've managed to get my "old" code back, but now, I got this error
W/GooglePlayServicesUtil: com.example.myforecast requires the Google Play Store, but it is missing.
W/GoogleApiManager: The service for com.google.android.gms.common.internal.service.zap is not available: ConnectionResult{statusCode=SERVICE_INVALID, resolution=null, message=null}
I've tried to install newest version of os and rebuild project. Result is still the same

Weird android system behavior if application is running more than ~8 hours

im currently building a digital signage app, which is running on displays which are based on android 7.*. Everything is working perfectly, except a weird OS behavior:
After a while (6-9h) of running the app, android minimizes my application, i don't get any error logs nor do i get a exception thrown.
My workaround solution is that im reopening the app every 2 hours, this is working fine, but its not what it should be.
I already tried it with WakeLock, Keep alive, Kiosk Mode, nothing seems to be working.
Does anyone have a idea how i could solve this android behavior?
I am getting pretty frustratet. PLS help :)

Android studio - MainActivity not declared over and over

I'm using Android studio 3.4.1 on Windows 10 x64 and I'm constantly getting same error over and over.
I can't run the app, because "MainActivity is not declared in AndroidManifest.json", and all code that uses something that requires permissions (NFC, read/write files, atc.) is marked as error, and the message is claiming that the permission is also missing in manifest.
These errors can be simply solved by Syncing grande files, as stated in this question: The activity 'MainActivity' is not declared in AndroidManifest.xml
However, after few minutes, these errors are back there again!
I've tried restarting the IDE many times, invalidating caches, syncing gradle many times...
But nothing helps. I got these errors, I sync gradle, errors are gone, I run the app, make tiny changes in code (like changing string in setText or changing textview margin), try to run it again, and the error is back. I sync gradle again, error is solved, I run the app, then I leave the IDE, Google something, and when I return to the IDE, the error is again back, even if no changes were made to the code.
I tried to Google this issue, but I was only able to find questions where this happend once.
Obviously there something that makes the Android Studio "forget" manifest every few minutes. The issue started to occur after my computer once lost power and shut down, so my first idea was corrupted files (as it could have happend while Android Studio was saving something), but if I ran the app after grande sync, it works fine, and it lasts few minutes before the errors are there back again.
So, as this issue happening once has been asked many times about, and many times there were different replies, I just started trying other suggestions.
I came acros this reply: https://stackoverflow.com/a/52687462/6357453
which suggests deleting folders with cache and other stuff Android Studio has created. I did and as of now, it's been more than an hour without this error, so this propably solved the issue.

Emulator in Android Studio won't load

Rendering problems. The following classes could not be instantiated:
- android.support.v7.internal.widget.ActionBarOverlayLayout .
Exception Details:
java.lang.ClassNotFoundException:
android.support.v7.appcompat.R$attr
^^^^^------- (The character represented by the '$' is another character I am unable to write. )
This is what shows up instead of my emulator in android studio. I deleted some projects before this happened and may have mistakenly edited a read-only file. I already tried reinstalling Android Studio and the Android SDK from scratch. Same result. Sometimes it will give an error related to utf-8 and give the option to open up the file encoding. It isn't doing that right now. This brings back the emulator but the drag and drop brings up a small window that can be changed on the emulator. And the problem comes back every time I restart Android Studio.
Is there anything I can do to fix this.
Thank you.
Have you tried to change apptheme? I know some rendering problems or error can be temporarliy fixed by doing this.
Try changing your base application theme using below code - in res/values/styles.xml
It seems to have fixed it for some people. It is also a bugg that will be fixed in a later version. Check the link for more info and some workarounds.
http://tools.android.com/knownissues#TOC-Can-t-Render-Layouts-in-Android-Studio-1.2

Android appt.exe has stopped working

Hi I am new to android and am doing some new basic projects. Whenever I try to save a project the alert box saying "unfortunately appt.exe has stopped working appears" and all of a sudden there are many errors that can be seen. I can also see that the R.java file disappears automatically and I dont know what to do next. I read somewhere that to delete the id in style, but cannot see any Id in my styles.xml file. I even deleted the whole SDK and downloaded and started from scratch, so would love if I could find any solution to this annoying problem.

Categories