线程“主”中的Flutter异常java.lang.NoSuchFieldError:FN_AAPT2

时间:2019-05-16 11:37:36

标签: flutter

sdkmanager --update get error

我在Windows上安装了flutter,但是在运行“ sdkmanager --update”时出现错误。

Exception in thread "main" java.lang.NoSuchFieldError: FN_AAPT2
    at com.android.sdklib.BuildToolInfo.<init>(BuildToolInfo.java:362)
    at com.android.sdklib.BuildToolInfo.fromStandardDirectoryLayout(BuildToolInfo.java:233)
    at com.android.sdklib.repository.legacy.local.LocalSdk.scanBuildTools(LocalSdk.java:897)
    at com.android.sdklib.repository.legacy.local.LocalSdk.getPkgsInfos(LocalSdk.java:543)
    at com.android.sdklib.repository.legacy.LegacyLocalRepoLoader.parseLegacyLocalPackage(LegacyLocalRepoLoader.java:100)
    at com.android.repository.impl.manager.LocalRepoLoaderImpl.parsePackages(LocalRepoLoaderImpl.java:167)
    at com.android.repository.impl.manager.LocalRepoLoaderImpl.getPackages(LocalRepoLoaderImpl.java:124)
    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.tool.sdkmanager.SdkManagerCliSettings.setSdkHandler(SdkManagerCliSettings.java:101)
    at com.android.sdklib.tool.sdkmanager.SdkManagerCli.<init>(SdkManagerCli.java:95)
    at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:74)
    at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)

如何解决它,有人可以帮助我,谢谢

1 个答案:

答案 0 :(得分:0)

重新安装sdkmanager后,它现在运行正常。