NoClassDefFoundError ResourceFolderType [英] NoClassDefFoundError ResourceFolderType

查看:91
本文介绍了NoClassDefFoundError ResourceFolderType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试构建我的应用程序时出现此错误:

  Error:Module'MyApp'生产:java.lang.NoClassDefFoundError:com/android/resources/ResourceFolderType 

我使用Android Studio 4.1,Flutter和Dart.我进行了搜索,感觉是整个互联网,但没有找到解决方案.SO上有一些帖子描述了NoClassDefFoundError和ClassNotFoundException之间的区别(

I get this error when I try to build my app:

Error:Module 'MyApp' production: java.lang.NoClassDefFoundError: com/android/resources/ResourceFolderType

I use Android Studio 4.1, flutter and dart. I've searched, what feels to be the entire internet, but found no solutions. There are some posts here on SO that describes the difference between NoClassDefFoundErrorand ClassNotFoundException (IE), but no hints on how to resolve this. Or more likely not explained in a sufficient dumbed down manner so I can understand it...

It seems to me that ResourceFolderType is suppose to exsits somewhere, URL, but that doesn't help me either.

My futter doctor looks like this:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.0, on Microsoft Windows [Version 10.0.18363.1379], locale nb-NO)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] Connected device (3 available)

• No issues found!

Any hints or pointers on what to do would be very much appreciated. Even just a link to the one site on the web I have not visited yet that describes a solution...

解决方案

I had the same issue. In my case, the solution was to choose the right way to build *.apk. Instead of choosing Build > Generate Single Bundle / APK ... I chose Build > Flutter > Build APK. This menu item is shown only when a window of any open project file is active.

这篇关于NoClassDefFoundError ResourceFolderType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆