ruotao923
Daemon__
2017-11-14 09:54

linux ; android studio ; jdk

  • jdk
  • android-studio
  • linux

在linux(ubuntu16)平台下,用命令行创建avd时 (输入android list target)
出现了以下错误(jdk1.8):
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager


Invalid or unsupported command ""

Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
root@ubuntu:/usr/local/androidqt/Sdk/tools/bin# android list target_


The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager


Running /usr/local/android_qt/Sdk/tools/bin/avdmanager list target

Exception in thread "main" java.lang.AssertionError: java.security.NoSuchAlgorithmException: MD5 MessageDigest not available
at com.google.common.hash.MessageDigestHashFunction.getMessageDigest(MessageDigestHashFunction.java:79)
at com.google.common.hash.MessageDigestHashFunction.(MessageDigestHashFunction.java:40)
at com.google.common.hash.Hashing$Md5Holder.(Hashing.java:193)
at com.google.common.hash.Hashing.md5(Hashing.java:189)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.getLocalPackagesHash(LocalRepoLoaderImpl.java:417)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.getPackages(LocalRepoLoaderImpl.java:126)
at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run(RepoManagerImpl.java:518)
at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:397)
at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:365)
at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.createRepoManager(AndroidSdkHandler.java:725)
at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager(AndroidSdkHandler.java:296)
at com.android.sdklib.repository.AndroidSdkHandler.getAndroidTargetManager(AndroidSdkHandler.java:331)
at com.android.sdklib.tool.AvdManagerCli.displayTargetList(AvdManagerCli.java:550)
at com.android.sdklib.tool.AvdManagerCli.doAction(AvdManagerCli.java:378)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:215)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.security.NoSuchAlgorithmException: MD5 MessageDigest not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at java.security.Security.getImpl(Security.java:695)
at java.security.MessageDigest.getInstance(MessageDigest.java:167)
at com.google.common.hash.MessageDigestHashFunction.getMessageDigest(MessageDigestHashFunction.java:77)
... 16 more

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答

为你推荐