2

当我运行 uiautomatorviewer 时,我收到以下错误: /android-sdk-linux/tools$

uiautomatorviewerException in thread "main" java.lang.NoSuchMethodError: com.ibm.icu.util.ULocale.getExtensionKeys()Ljava/util/Set;
    at com.ibm.icu.util.ULocale$Builder.setLocale(ULocale.java:4011)
    at com.ibm.icu.impl.javaspi.ICULocaleServiceProvider.addULocale(ICULocaleServiceProvider.java:204)
    at com.ibm.icu.impl.javaspi.ICULocaleServiceProvider.getLocales(ICULocaleServiceProvider.java:140)
    at com.ibm.icu.impl.javaspi.ICULocaleServiceProvider.getAvailableLocales(ICULocaleServiceProvider.java:53)
    at com.ibm.icu.impl.javaspi.text.DecimalFormatSymbolsProviderICU.getAvailableLocales(DecimalFormatSymbolsProviderICU.java:28)
    at sun.util.LocaleServiceProviderPool.getProviderLocales(LocaleServiceProviderPool.java:235)
    at sun.util.LocaleServiceProviderPool.getLocalizedObjectImpl(LocaleServiceProviderPool.java:370)
    at sun.util.LocaleServiceProviderPool.getLocalizedObject(LocaleServiceProviderPool.java:303)
    at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:150)
    at java.util.Formatter.getZero(Formatter.java:2251)
    at java.util.Formatter.<init>(Formatter.java:1877)
    at java.util.Formatter.<init>(Formatter.java:1898)
    at java.lang.String.format(String.java:2792)
    at com.android.ddmlib.AndroidDebugBridge.checkAdbVersion(AndroidDebugBridge.java:583)
    at com.android.ddmlib.AndroidDebugBridge.<init>(AndroidDebugBridge.java:559)
    at com.android.ddmlib.AndroidDebugBridge.createBridge(AndroidDebugBridge.java:319)
    at com.android.uiautomator.DebugBridge.init(DebugBridge.java:68)
    at com.android.uiautomator.UiAutomatorViewer.main(UiAutomatorViewer.java:71)

有人可以帮帮我吗?

谢谢你的时间。

4

1 回答 1

1

由于我的工具/目录未添加到 PATH 中。我使用 $./uiautomatorviewer 命令来运行我的 uiautomatorviewer 并且它有效。感谢@DiegoTorresMilano 的建议

于 2016-05-11T07:13:16.940 回答