Gradle build:资源android:styleTextAppearance.Material not found

Gradle build:资源android:styleTextAppearance.Material not found,第1张

概述我刚刚安装了AndroidStudio并导入了一个旧的EclipseADT项目(API级别18).但是,在尝试在AndroidStudio中构建此项目时,我收到以下错误:resourceandroid:style/TextAppearance.Materialnotfound.resourceandroid:style/TextAppearance.Material.Body1notfound.resource

我刚刚安装了AndroidStudio并导入了一个旧的Eclipse ADT项目(API级别18).但是,在尝试在AndroIDStudio中构建此项目时,我收到以下错误:

resource androID:style/TextAppearance.Material not found.   resource androID:style/TextAppearance.Material.Body1 not found. resource androID:style/TextAppearance.Material.Body2 not found. resource androID:style/TextAppearance.Material.button not found.    resource androID:style/TextAppearance.Material.Caption not found.   resource androID:style/TextAppearance.Material.display1 not found.  resource androID:style/TextAppearance.Material.display2 not found.  resource androID:style/TextAppearance.Material.display3 not found.  resource androID:style/TextAppearance.Material.display4 not found.  resource androID:style/TextAppearance.Material.headline not found.  resource androID:style/TextAppearance.Material.Inverse not found.   resource androID:style/TextAppearance.Material.Large not found. resource androID:style/TextAppearance.Material.Large.Inverse not found. resource androID:style/TextAppearance.Material.Widget.PopupMenu.Large not found.    resource androID:style/TextAppearance.Material.Widget.PopupMenu.Small not found.    resource androID:style/TextAppearance.Material.Medium not found.    resource androID:style/TextAppearance.Material.Medium.Inverse not found.    resource androID:style/TextAppearance.Material.Menu not found.  resource androID:style/TextAppearance.Material.SearchResult.SubTitle not found. resource androID:style/TextAppearance.Material.SearchResult.Title not found.    

我该如何解决这个错误?我应该提供哪些进一步的信息?

这是导入协议,如果它有帮助:

ECliPSE ANDROID PROJECT import SUMMARY======================================Manifest Merging:-----------------Your project uses librarIEs that provIDe manifests, and your Eclipseproject dID not explicitly turn on manifest merging. In AndroID Gradleprojects, manifests are always merged (meaning that contents from yourlibrarIEs' manifests will be merged into the app manifest. If you hadmanually copIEd contents from library manifests into your app manifestyou may need to remove these for the app to build correctly.Ignored files:--------------The following files were *not* copIEd into the new Gradle project; youshould evaluate whether these are still needed in your project and ifso manually move them:* .gitignore* ic_launcher-web.png* proguard-project.txtReplaced Jars with DependencIEs:--------------------------------The importer recognized the following .jar files as third partylibrarIEs and replaced them with Gradle dependencIEs instead. This hasthe advantage that more explicit version information is kNown, and thelibrarIEs can be updated automatically. However, it is possible thatthe .jar file in your project was of an older version than thedependency we picked, which Could render the project not compileable.You can disable the jar replacement in the import wizard and try again:androID-support-v4.jar => com.androID.support:support-v4:18.0.0Replaced librarIEs with DependencIEs:-------------------------------------The importer recognized the following library projects as third partylibrarIEs and replaced them with Gradle dependencIEs instead. This hasthe advantage that more explicit version information is kNown, and thelibrarIEs can be updated automatically. However, it is possible thatthe source files in your project were of an older version than thedependency we picked, which Could render the project not compileable.You can disable the library replacement in the import wizard and tryagain:Google-play-services_lib => [com.Google.androID.gms:play-services:+]Moved files:------------AndroID Gradle projects use a different directory structure than ADTEclipse projects. Here's how the projects were restructured:* AndroIDManifest.xml => app\src\main\AndroIDManifest.xml* assets\ => app\src\main\assets* libs\commons-net-3.3.jar => app\libs\commons-net-3.3.jar* res\ => app\src\main\res\* src\ => app\src\main\java\Next Steps:-----------You can Now build the project. The Gradle project needs networkconnectivity to download dependencIEs.BUGs:-----If for some reason your project does not build, and you determine thatit is due to a BUG or limitation of the Eclipse to Gradle importer,please file a BUG at http://b.androID.com with categoryComponent-Tools.(This import summary is for your information only, and can be deletedafter import once you are satisfIEd with the results.)

解决方法:

您的编译SDK版本必须与支持库匹配.所以这里有一个最新版本的示例,与您的相似或更新到最新版本(推荐),如下所示:

1.在Build.gradle中更改:

implementation 'com.androID.support:appcompat-v7:28.0.0'

2.将compileSdkVersion和buildToolsversion更改为:

compileSdkVersion 28buildToolsversion "28.0.3"

3.更新项目grandle文件:

classpath 'com.androID.tools.build:gradle:3.3.1'

我建议你在最新版本中更新你项目中的所有依赖项,如果你提供我们的grandle文件,我会帮助你更多.希望这对你有所帮助.

总结

以上是内存溢出为你收集整理的Gradle build:资源android:style / TextAppearance.Material not found全部内容,希望文章能够帮你解决Gradle build:资源android:style / TextAppearance.Material not found所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1104890.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存