I am getting below error while capturing screenshot in Android Studio 2.0. I tried with 2 different tablets and with both of them I am getting this error.
Unexpected Error while obtaining screenshot - java.lang.Nullpointerexception
I have googled and also looked at different stackoverflow questions but didnt found any which can resolve this issue.
I have recently installed Android Studio 2.0 and this could be a problem I dont know.
This is an old question but there is another specific reason why this can happen, and while it is clearly not OP's case, it might still help someone else:
If you have getActivity().getWindow().addFlags(LayoutParams.FLAG_SECURE); set (normally used to avoid screenshots), it will also prevent you from taking screenshots from Android Studio, generating the same error Unexpected Error while obtaining screenshot.
Restarting the Android Studio worked for me.
It doesn't give the screen capture error after I restarted Android studio.
Goto AndroidStudio settings->System settings ->checked Support screen reader
and restart your android studio.
enter image description here
Related
I have updated my Android Studio to 3.0.1. after starting Studio, I get a strange error. I searched whole day, but couldn't find any solution for this. I even uninstalled Studio twice without keeping the old settings, but still facing the same issue. Please help, if anyone has gone through same issue.
Error:Execution failed for task ':myProject:transformResourcesWithMergeJavaResForDebug'.
More than one file was found with OS independent path 'values/dimens.xml'
Other users have been faced to this kind of issue after an Android Studio update to version 3.
Please see this answer and let us know if it solved your problem.
Recently i made an app for android through android studio, a very simple app.
But when i started the emulator to test the app i received an unusual error.
This is what the error looks like in a general form :-
WARNING:./android/base/files/IniFile.cpp:155:Failed to process .ini file C:\Users\xxxxxxx.android\avd\Nexus_5_API_23.ini for reading.
My question is,
1) What is the meaning of this error ?
2) And how do i solve this error ?
Have you recently updated the SDK tools. It sounds like it might be some compatibility issue with the tools and the emulator. Try going into the AVD manager and see if there is an update, and/or delete the emulator and re-create and see if that solves the issue.
I have updated my android studio 1.1 Preview 5 with Android studo 2.2.
When i open or create project is always gives an error like
Cannot load project: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.intellij.debugger.DebuggerManager'
I have tried to load my previous android studio's configurations but still it gives an error.
Then i have started without importing configuration and it also gives an error.
I have tried to remove cache directory and then also gives an error.
So please help me to solve this problem.
To fix the problem I tried to download and reinstall the Android Studio
but the error appeared again on the second start of the app.
Finally I found that my desktop shortcut had a wrong target file studio.exe, not studio64.exe.
I spent a couple weeks figuring this one out but as it turns out the issue was with my Java Home environment variable. I had mistakenly set jre1.8.etc as my home when it in fact needed to be the jdk1.8.0_101.
I probably just clicked on the wrong dl link because when I redownloaded the jdk it replaced the jre file. Hope this helps.
I have an Android application. In the latest version I've moved some code from it into separate Android Library projects (two). One library depends on another and project depends on both libraries. So, as I understand, one library includes into final application "twice" (or something similar to twice).
On the first launch of application I receive following in Console (I am using Eclipse):
Installation error: 0
Please check logcat output for more details.
Launch canceled!
Can anybody help?
Thanks!
EDIT
On the second launch program starts normally.
EDIT
I tried to reproduce error on the emulator and other device, it didn't reproduce! Can a problem be on my device? May be on file not deleted or something else?
I've reinstalled Android on my phone and problem solved :) Not a good solution, but works.
I found this open source project: Android Boostrap. However, I am having some troubles with getting it run in IntelliJ. I have followed their own instructions, but still I am running into some problems. Note that I just started using IntelliJ. I cannot even describe the errors I am getting very precisely, since I am not sure about what exactly is causing them. Here is the screenshot of what I have:
Navigating to the problem:
How do you suggest me to solve it?
Another snapshot regarding unsupported import: