简体   繁体   中英

How to add Android SDK to Intellij?

I installed Android Studio, got the path to the SDK (/Users/welf/Library/Android/sdk), added JDK to IntelliJ, clicked "Add Android SDK", navigated to the path above, selected... and then IntelliJ quits unexpectedly. Every time. With this output... Why? What to do?

Process:               idea [7678]
Path:                  /Applications/IntelliJ IDEA CE.app/Contents/MacOS/idea
Identifier:            com.jetbrains.intellij.ce
Version:               2020.2.1 (IC-202.6948.69)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           idea [7678]
User ID:               501

Date/Time:             2020-09-16 21:50:18.094 +0200
OS Version:            Mac OS X 10.16 (20A5364e)
Report Version:        12
Bridge OS Version:     3.0 (14Y908)
Anonymous UUID:        3E55EF41-A528-C1D5-99E4-06C437DD47CC

Sleep/Wake UUID:       5132E6E7-1E44-4E90-92D6-20185BA86220

Time Awake Since Boot: 9600 seconds
Time Since Wake:       150 seconds

System Integrity Protection: enabled

Crashed Thread:        0  CrBrowserMain  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000000000f8
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0xf8:
--> 
    __TEXT                        106014000-10601a000        [   24K] r-x/rwx SM=COW  /Applications/IntelliJ IDEA CE.app/Contents/MacOS/idea

Application Specific Information:
abort() called

Thread 0 Crashed:: CrBrowserMain  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff2231c50a __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff2241c671 pthread_kill + 263
2   libsystem_c.dylib               0x00007fff224de740 abort + 120
3   libjvm.dylib                    0x00000001084a8734 os::abort(bool, void*, void const*) + 22
4   libjvm.dylib                    0x00000001085facf1 VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) + 2953
5   libjvm.dylib                    0x00000001085fa142 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) + 152
6   libjvm.dylib                    0x00000001085fad8d VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) + 33
7   libjvm.dylib                    0x00000001084ac669 JVM_handle_bsd_signal + 774
8   libjvm.dylib                    0x00000001084aa1b5 signalHandler(int, __siginfo*, void*) + 45
9   libsystem_platform.dylib        0x00007fff224edd7d _sigtramp + 29
10  ???                             0x000000000000ffff 0 + 65535
11  com.apple.AppKit                0x00007fff2505e6db -[NSApplication run] + 765
12  libosxapp.dylib                 0x000000010e0a24f0 +[NSApplicationAWT runAWTLoopWithApp:] + 222
13  libawt_lwawt.dylib              0x000000010e004ab2 +[AWTStarter starter:headless:] + 834
14  com.apple.JavaNativeFoundation  0x00007fff6693870f +[JNFRunLoop _performCopiedBlock:] + 15
15  com.apple.Foundation            0x00007fff23329fa9 __NSThreadPerformPerform + 204
16  com.apple.CoreFoundation        0x00007fff2265a4bc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17  com.apple.CoreFoundation        0x00007fff2265a424 __CFRunLoopDoSource0 + 180
18  com.apple.CoreFoundation        0x00007fff2265a19f __CFRunLoopDoSources0 + 248
19  com.apple.CoreFoundation        0x00007fff22658bd1 __CFRunLoopRun + 890
20  com.apple.CoreFoundation        0x00007fff2265816e CFRunLoopRunSpecific + 563
21  com.jetbrains.intellij.ce       0x0000000106015bf5 main + 332
22  libdyld.dylib                   0x00007fff22437951 start + 1

...

Better install Android Studio which downloads or recognizes the existing Android SDK for you to use in installation step. So you don't need to do it explicitly with Intellij Studio.

If you want flutter then Android Studio comes with plugin for it.

Looks like the crash is caused by JCEF which is bundled with the IDE Java Runtime: JBR-2377 . Try to add ide.browser.jcef.enabled==false into IDE .properties file (Help | Edit Custom Properties... action) and restart IDE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM