Android Studio Getting Crash on Linux - android

i'm using linux mint. now i'm facing this problem i can't even find solution.
hope someone help me here.
System configuration.
*Operating System : Linux Mint 19 Cinnamon
Cinnamon Version : 3.8.7
Linux Kernal : 4.15
Processor : AMD FX(tm)-8150
RAM : 8GB*
here is crash details.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f8550bde9ca, pid=20860, tid=0x00007f84cb8ce700
#
# JRE version: OpenJDK Runtime Environment (8.0_152-b01) (build 1.8.0_152-release-1024-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.152-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 46464 C1 com.intellij.openapi.editor.impl.view.LineLayout$SingleChunk.getChunksInLogicalOrder()Ljava/util/stream/Stream; (21 bytes) # 0x00007f8550bde9ca [0x00007f8550bde4c0+0x50a]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#

Hi i have faced the same problem,And finally i found the solution for it.Actually in my case while i am try to checkout the subversion in android studio fully crashed.I mean it was closed unexpectedly.I spend the lot of time of it.
Go to your home directory like home/vijay(your path) then Ctrl + H.It will show your all hidden files in there just delete the following files.
.android
.java
.subversion
.gradle
Note : Do these stuffs before open android studio.
Then open android studio it will work sure.
Don't worry if you delete also it will create automatically.

Related

Android Studio Chipmunk 2021.2.1 crashes on M1 Monterey 12.5.1

I just updated from Monterey 12.5 to 12.5.1.
However, after that Android Studio (android-studio-2021.2.1.16-mac_arm.dmg) no longer starts.
I get the following error message:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000107d72e38, pid=92768, tid=259
#
# JRE version: OpenJDK Runtime Environment (11.0.12) (build 11.0.12+0-b1504.28-7817840)
# Java VM: OpenJDK 64-Bit Server VM (11.0.12+0-b1504.28-7817840, mixed mode, tiered, compressed oops, g1 gc, bsd-aarch64)
# Problematic frame:
# V [libjvm.dylib+0x6d2e38] AccessInternal::PostRuntimeDispatch<G1BarrierSet::AccessBarrier<1097844ull, G1BarrierSet>, (AccessInternal::BarrierType)2, 1097844ull>::oop_access_barrier(void*)+0x8
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/Tom/java_error_in_studio_92768.log
[thread 74759 also had an error]
[thread 91395 also had an error]
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
The content of /Users/Tom/java_error_in_studio_92768.log is a little long to post here, but does not give any deeper insights (at least for me).
Anybody having the same problem?
I updated to the release candidate of the next version called "Dolphin" which is the file "android-studio-2021.3.1.15-mac_arm.dmg".
Now it works again as it should.

using android native libs on PC

I have an apk with native .so libs, compiled for all architectures: armabi, mips, x86 and x86_64. I want to use these libs in my java app.
As i suppose, for building app on desktop i need to copy .so file from x86_64 folder anywhere on my PC, i've copied it to ~/IdeaProjects/ecg/lib/x86_64. After that i provided to VM path to this file as follows: -Djava.library.path=/home/user/IdeaProjects/ecg/lib/x86_64
Then i wrote wrapper for using this library on my project. In static initializer of wrapper i trying to load the library like that (my library file named libnative-lib.so):
static
{
System.loadLibrary("native-lib");
}
And during loading library i receive this exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/user/IdeaProjects/ecg/lib/x86_64/libnative-lib.so: liblog.so: cannot open shared object file: no such file or directory
So what is liblog.so? Where can i get it? I tried to dig and all what i found was compiled liblog.so for different arches on github. I've found one for x86_64 there, put it near my native lib file, but the exception didn't disappear.
What can i do for achieving my goal?
UPD
sudo apt install android-liblog && android-liblog-dev and provide LD_LIBRARY_PATH=/usr/lib/android resolve this issue. But now i'm received next error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/user/IdeaProjects/ecg/lib/x86_64/libnative-lib.so: /usr/lib/x86_64-linux-gnu/libm.so: invalid ELF header
UPDUPD finally i've copied all dependent libs from android sdk folder (Sdk/ndk-bundle/platforms/android-24/arch-x86_64/usr/lib64) and exceptions has gone. Now app simply falls with this report:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=11338, tid=0x00007ffaccb05700
#
# JRE version: OpenJDK Runtime Environment (8.0_131-b11) (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
# Java VM: OpenJDK 64-Bit Server VM (25.131-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000000
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/user/IdeaProjects/ecg/hs_err_pid11338.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

Eclipse crashes on importing a library

Hey guys I am having issue with eclipse. Every time when I want to import some library lets say org.opencv eclipse crashes. It crashes in the moment when I write dot org(dot)opencv. Have you seen somthing like this? Can you help me to fix it please?
I am using Ubuntu 14.04,
adt-bundle-linux-x86_64-20140702.
I also recorded a video [http://tinypic.com/r/2nm15ip/8][1].
Thank you for your help.
I tried it open in terminal and of course it crashed but i got some answer:
libEGL warning: DRI2: failed to authenticate
NOT SANDBOXED
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fc79f6052a1, pid=9886, tid=140499127801600
#
# JRE version: Java(TM) SE Runtime Environment (7.0_72-b14) (build 1.7.0_72-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.72-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/nemesis/NEW_Android_Development_Enviroment/adt-bundle-linux-x86_64-20140702/eclipse/hs_err_pid9886.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
And also I found out that in my eclispe folder has been created error report.
I uploaded it here:
http://www.filedropper.com/hserrpid32252
After 6 hours I have found solution....
To solve this issue, try to put this line (slightly different from -Dorg...)
org.eclipse.swt.browser.DefaultType=mozilla
at the end of this file
eclipse/configuration/config.ini
I am so happy and angry at the same time.
Thanks for help to everyone :)

cocos2d-x 3.0 rc0 : develop for android in eclipse

I'm on windows xp & Eclipse Kepler. I want to develop with cocos2d-x, but I have some problem.
First, I created project.
cocos new MyGame -p com.myprog.MyGame -l cpp -d MyGame
and I tried run:
cd MyGame
cocos run -s MyGame -p android
and it succeeded.
The problem happens when I open it by eclipse. I create eclipse project, Android Project From Existing Code.
But I can't know what to do next.. even I don't know how to build! (Project - Build doesn't work..)
Moreover, Classes, cocos2dx, extensions and scripting folder are broken..
I tried to find solution, but people are saying about only cocos2d-x 2.x ...
Even if README.md seems to say about 2.x!
Could anyone tell me how do I do?
Installation Process:
Cocos2d require NDK and Cygwin
First install NDK ->
This links may help you :
http://nikhilvithlani.blogspot.in/2013/07/install-android-ndk-for-windows_6.html
Cocos 2d installation link:
http://www.cocos2d-x.org/wiki/How_to_set_up_the_android_cocos2d-x_development_environment_on_Windows_7
Download cocos 2d version and follow the instruction in above link
This packages you required in cygwin: search and install:
autoconf, automake, binutils, gcc-core, gcc-g**, gcc4-core, gcc4-g**, gdb, pcre, pcre-devel, gawk, make
After installation cygwin,ndk and you need to config in C/C++ preference in eclipse(Don't forget to install c/c++ plugin in eclipse)
My NDK and PATH is :
NDK_ROOT->C:/android-ndk-r9c
PATH->C:\android-ndk-r9c;C:\Cygwin\bin;
Then import the sample project :
cocos2d-x-2.2.2\samples\Cpp\HelloCpp\proj.android
Import the library :
cocos2d-x-2.2.2\cocos2dx\platform\android\java
Add the library to hello world project
when you import hello world project eclipse automatically include the header files:
bash F:/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android/build_native.sh
cygwin warning:
MS-DOS style path detected: F:\cocos2d-x-2.2.2\samples\Cpp\HelloCpp\proj.android
Preferred POSIX equivalent is: /cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
NDK_ROOT = C:/android-ndk-r9c
COCOS2DX_ROOT = /cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android/../../../..
APP_ROOT = /cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android/..
APP_ANDROID_ROOT = /cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android
Using prebuilt externals
+ C:/android-ndk-r9c/ndk-build -C /cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android NDK_MODULE_PATH=/cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android/../../../..:/cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt
make: Entering directory '/cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android'
Android NDK: WARNING: APP_PLATFORM android-9 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml
Android NDK: WARNING:/cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android/../../../../cocos2dx/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
[armeabi] Install : libhellocpp.so => libs/armeabi/libhellocpp.so
make: Leaving directory '/cygdrive/f/cocos2d-x-2.2.2/samples/Cpp/HelloCpp/proj.android'
After get output in console right click project and goto properties and choose paths and symbols under c/c++ general
Run the project and you can see the output :
Useful links:
http://www.youtube.com/watch?v=2itbQceTQGI
You can handle it in different way though you are on windows you have to use Microsoft Visual Studio Express 2012 for Windows Desktop its free and also it will give you good IntelliSense support.
Every time you edit using MS VS2012 run proj.android/build_native.py and then you can run your app from eclipse as usual.

Error with building Android NDK Project

I wand build project in windows, I get same Errors:
bash C:\linux\android-ndk1\ndk-build V=1
cygwin warning:
MS-DOS style path detected: C:\dev\android\workspace4_android\FFWall
Preferred POSIX equivalent is: /cygdrive/c/dev/android/workspace4_android/FFWall
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Android NDK: ERROR:jni/Android.mk:bambuser-libavcore: LOCAL_SRC_FILES points to a missing file
/cygdrive/c/linux/android-ndk1/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
Android NDK: Check that jni/ffmpeg-android/build/ffmpeg/armeabi/lib/libavcore.so exists or that its path is correct
Another way building:
C:\art\android-ndk\ndk-build V=1
Cannot run program "C:\art\android-ndk\ndk-build": Launching failed
Error: Program "C:/art/android-ndk/ndk-build" is not found in PATH
PATH=[C:\Art\android-ndk;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\MATLAB\R2011a\runtime\win32;C:\Program Files\MATLAB\R2011a\bin;C:\Program Files\MATLAB\R2007b\bin;C:\Program Files\MATLAB\R2007b\bin\win3;C:\dev\android\android-sdk-windows\tools;C:\cygwin\bin;C:/art/android-ndk/;C:\linux\android-ndk-r7b;C:\dev\android\eclipse]
Why this happened?
From: http://developer.android.com/sdk/ndk/overview.html#reqs
Required development tools
For all development platforms, GNU Make 3.81 or later is required. Earlier versions of GNU Make might work but have not been tested.
A recent version of awk (either GNU Awk or Nawk) is also required.
For Windows, Cygwin 1.7 or higher is required. The NDK will not work with Cygwin 1.5 installations.
Meaning, that you will have to install Cygwin. After that you can call the ndk-build like:
$ProjectPath> /cygdrive/c/myNdkPath/ndk-build
Please also check the "Getting Started" part of:
http://developer.android.com/sdk/ndk/index.html

Categories

Resources