在我前面的文章中,写了关于如果启动Android源码编译出来的模拟器的问题,如果在编译SDK之前启动模拟器,是没有问题的,当编译了SDK,再启动模拟器就会报这样的问题:
ERROR: You did not specify a virtual device name, and the system
directory could not be found.
If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (see -help-avd for details).
Otherwise, follow the instructions in -help-disk-images to start the emulator
在网上寻求答案,有的说没有avd,好吧,那我添加avd,当进入到tools目录下使用 android工具又报错:
SWT folder '/home/archermind/source/source/out/host/linux-x86/framework/x86_64' does not exist.
Please export ANDROID_SWT to point to the folder containing swt.jar for your platform.
跟着解决:
export ANDROID_SWT=/home/archermind/source/source/out/host/linux-x86/framework
接着使用 /$ android 命令,接着报错:
/$ android
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:319)
at com.android.sdkmanager.Main.doAction(Main.java:307)
at com.android.sdkmanager.Main.run(Main.java:116)
at com.android.sdkmanager.Main.main(Main.java:99)
接着查错,发现净是些关于eclipse的问题,所以我重新整理了一下,看问题的可能所在,看一下大的操作步骤:
1. make ----- 编译Android源代码
(编译好了后,先 . /build/envsetup.sh 之后再启动模拟器没有问题)
2.lunch sdk-eng ----- 指定版本
3.make sdk ------ 编译sdk
(模拟器启动不了了,报错信息看上文)
所以问题处在2 ,3 步骤,重新make之后还是存在这样的问题,最终,在make前指定版本 ,执行 lunch sdk-eng ,再执行make,这样模拟器就可以使用了。
ERROR: You did not specify a virtual device name, and the system
directory could not be found.
If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (see -help-avd for details).
Otherwise, follow the instructions in -help-disk-images to start the emulator
在网上寻求答案,有的说没有avd,好吧,那我添加avd,当进入到tools目录下使用 android工具又报错:
SWT folder '/home/archermind/source/source/out/host/linux-x86/framework/x86_64' does not exist.
Please export ANDROID_SWT to point to the folder containing swt.jar for your platform.
跟着解决:
export ANDROID_SWT=/home/archermind/source/source/out/host/linux-x86/framework
接着使用 /$ android 命令,接着报错:
/$ android
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:319)
at com.android.sdkmanager.Main.doAction(Main.java:307)
at com.android.sdkmanager.Main.run(Main.java:116)
at com.android.sdkmanager.Main.main(Main.java:99)
接着查错,发现净是些关于eclipse的问题,所以我重新整理了一下,看问题的可能所在,看一下大的操作步骤:
1. make ----- 编译Android源代码
(编译好了后,先 . /build/envsetup.sh 之后再启动模拟器没有问题)
2.lunch sdk-eng ----- 指定版本
3.make sdk ------ 编译sdk
(模拟器启动不了了,报错信息看上文)
所以问题处在2 ,3 步骤,重新make之后还是存在这样的问题,最终,在make前指定版本 ,执行 lunch sdk-eng ,再执行make,这样模拟器就可以使用了。