V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  nnegier  ›  全部回复第 1 页 / 共 30 页
回复总数  584
1  2  3  4  5  6  7  8  9  10 ... 30  
@liyafe1997
是的,按理说 QEMU 是可以模拟运行 x86 的镜像的,我刚刚用 UTM ( QEMU 的 UI 界面软件)试了一下 Android 4.4 x86 的 Live (未安装,那个安装太麻烦了,暂时没耐心了),结论是:能运行,但很慢。我也不知道 AndroidStudio 为什么自动判断一下然后采用模拟的方案,虽然慢,但是能用也是很好的事呀。
@nnegier 也许也不行,除非系统是 32 位的,因为我看到 ABI 都是 x86 ,不是 x86_64 。
总结就是因为我的 Mac 是 arm64‘s host ,所以只能运行 arm64 的 ABI ,而 Android 19 我在 Images 列表中没有看到这个 ABI 的 Image ,所以我的电脑是没法用 AndroidStudio 运行的。如果用 Windows 或者 x86 的 Mac 应该是可以运行 x86 镜像的。
在 Mac 只能正常运行 arm64 的镜像
然后改了下 x86 ,当然这样更不行了
```
2025-03-14 00:34:07,823 [1990660] INFO - Emulator: Pixel API 19 - /Users/duanxuebin/Library/Android/sdk/emulator/emulator -netdelay none -netspeed full -avd Pixel_API_19 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
2025-03-14 00:34:07,850 [1990687] INFO - Emulator: Pixel API 19 - Android emulator version 35.4.9.0 (build_id 13025442) (CL:N/A)
2025-03-14 00:34:07,850 [1990687] INFO - Emulator: Pixel API 19 - PANIC: Avd's CPU Architecture 'x86' is not supported by the QEMU2 emulator on aarch64 host.
2025-03-14 00:34:07,850 [1990687] INFO - Emulator: Pixel API 19 - Graphics backend: gfxstream
2025-03-14 00:34:07,850 [1990687] INFO - Emulator: Pixel API 19 - Found systemPath /Users/duanxuebin/Library/Android/sdk/system-images/android-19/default/x86/
2025-03-14 00:34:07,851 [1990688] INFO - Emulator: Pixel API 19 - Process finished with exit code 1
2025-03-14 00:34:07,851 [1990688] WARN - Emulator: Pixel API 19 - Emulator terminated with exit code 1
```
答案就是不行。
~/Library/Logs/Google/AndroidStudio2024.2/idea.log
```
2025-03-14 00:15:51,164 [ 894001] INFO - Emulator: Pixel API 19 - /Users/duanxuebin/Library/Android/sdk/emulator/emulator -netdelay none -netspeed full -avd Pixel_API_19 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
2025-03-14 00:15:51,192 [ 894029] INFO - Emulator: Pixel API 19 - PANIC: CPU Architecture 'arm' is not supported by the QEMU2 emulator, (the classic engine is deprecated!)
2025-03-14 00:15:51,192 [ 894029] INFO - Emulator: Pixel API 19 - Android emulator version 35.4.9.0 (build_id 13025442) (CL:N/A)
2025-03-14 00:15:51,192 [ 894029] INFO - Emulator: Pixel API 19 - Graphics backend: gfxstream
2025-03-14 00:15:51,193 [ 894030] INFO - Emulator: Pixel API 19 - Process finished with exit code 1
2025-03-14 00:15:51,193 [ 894030] WARN - Emulator: Pixel API 19 - Emulator terminated with exit code 1
2025-03-14 00:15:52,171 [ 895008] WARN - #com.android.sdklib.deviceprovisioner.DeviceAction - The emulator process for AVD Pixel_API_19 has terminated.
com.android.tools.idea.avdmanager.EmulatorConnectionListener$EmulatorTerminatedException: The emulator process for AVD Pixel_API_19 has terminated.
at com.android.tools.idea.avdmanager.EmulatorConnectionListener$WaitForEmulatorTask.run(EmulatorConnectionListener.java:93)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$1.run(AnyThreadWriteThreadingSupport.kt:134)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Unknown Source)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
```
30 天前
回复了 nnegier 创建的主题 Java Android 的 Java 是阉割版的?何解呢
@lisongeee #23 这个是基础,网络权限肯定是加了的,而且我还自行写了一个 socket 来测试过
19
32 天前
回复了 nnegier 创建的主题 Java Android 的 Java 是阉割版的?何解呢
@w568w #18 回答很好,然后[4]那个我早先试过,运行没成功
32 天前
回复了 nnegier 创建的主题 Java Android 的 Java 是阉割版的?何解呢
@flyqie 谢谢你的回答。我认为 jd 区别不小的原因是 Android 有一个 Framework 层(各种框架服务)通过 SDK 提供了很多 API ,以及各个 android 版本会有改动,开发者需要去了解,需要多看文档多读源码以及多实践,而 java 程序员就是纯面向 Java 了,once write ,run anywhere 。看你说的,可能真的没有办法在 Android 中使用非阉割版的 java 了,其实如果支持,Android 程序员会爽很多。我有这个问题,是因为我在写一个 http server ,当然这个不难,就是解析 http 文本返回数据,当然最主要是因为我需求很简单,然后之前用 IDEA 写好了代码搬不到 Android 去,现在又在重新写,真的挺烦的因为完全是重复的
32 天前
回复了 nnegier 创建的主题 Java Android 的 Java 是阉割版的?何解呢
@HojiOShi 所以我的问题来了,应该怎么办呢?自己写一个吗,有没有办法就是使用到非阉割版的 java 呢在 Android 里呢?
32 天前
回复了 nnegier 创建的主题 Java Android 的 Java 是阉割版的?何解呢
@HojiOShi 谢谢你抓我,可以让我更好的反思自己。另外,这个我显然是知道才发出来的,java 确实有很多版本,但我确实没有和别人交流过这件事情,因为我多次想将一些 java lib 直接考到 Android 项目中用,都会报各种错误。
33 天前
回复了 Leoking222 创建的主题 程序员 求教,如何做一个网吧系统
我也想写个网管系统,然后还想了一个吸烟可免费暂停 15 分钟的功能,避免网吧乌烟瘴气。这个我认为如果是一个 Win 大佬的话不是很难,然后上面有说的一些公安年龄认证接入就正常接入就好了,要什么资质提供什么资质,这个耗时应该是最少的,开发与实机测试才是最耗时的
@dragondove #10 这个方法很有用,可视化后对算法的稳定性会有更好的认识和认知
@mumbler #9 回你一句,你以为我在第一层,实际
@kapaseker 这个还是必须要学,用不用是一回事
@flyqie 一所 211 大学用的教材书,清华大学出版社,纯满足你的好奇心,千万别回复我,这个话题结了。
@flyqie 书,因为它在无序序列的时候用不等于,在有序序列的时候突然用了大于小于
103 天前
回复了 mikewang 创建的主题 程序员 14 岁的我,注册了 V2EX。
哈哈哈哈,感觉作者有点诙谐
1  2  3  4  5  6  7  8  9  10 ... 30  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1054 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 44ms · UTC 23:01 · PVG 07:01 · LAX 16:01 · JFK 19:01
Developed with CodeLauncher
♥ Do have faith in what you're doing.