添加 Android Image Cropper 库会引发错误 [英] Adding Android Image Cropper library throws an error

查看:56
本文介绍了添加 Android Image Cropper 库会引发错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将此库添加到我的 Android 应用项目时,它给了我一个错误:

When I add this library to my Android app project it gives me an error:

检索项目的父项时出错:找不到与给定名称'android:TextAppearance.Material.Widget.Button.Inverse'匹配的资源

"Error retrieving parent for item: No resource found that matches the given name'android:TextAppearance.Material.Widget.Button.Inverse'

(还有 3 个类似的错误)

(and 3 more errors like that)

它还带我到 v23/values-v23.xml 文件,其中标记了这一行:

It also takes me to v23/values-v23.xml file where this line is marked:

我的 minSdkVersion 是 15,targetSdkVersion 21 和 compileSdkVersion 21.我猜这些应该保持原样?

My minSdkVersion is 15, targetSdkVersion 21 and compileSdkVersion 21. And these should stay as they are, I guess?

我使用的是 Android Image Cropper 2.1.4,所以我认为这意味着它应该可以在 compileSdkVersion 21 上正常运行.

I am using Android Image Cropper 2.1.4 so i assume it means that it should run fine on compileSdkVersion 21.

谁能给我一些提示如何解决这个问题?

Could anyone give me some hints how to solve this problem?

我对 Android 开发有点陌生

I am a bit new to Android development

推荐答案

如果您确定在将这个库包含到您的项目后会出现这些错误,那么肯定这个库正在使用一些样式资源 继承自不存在的父资源 TextAppearance.Material.Widget.Button.Inverse.此问题将通过继承现有的父资源来解决(将 targetSDKVersion 设置为至少使用什么库).

If you are sure that these errors arise after including this library to you project, than surely this library is making use of some style resource that inherits from the parent resource TextAppearance.Material.Widget.Button.Inverse that does not exist. This issue will be resolved by inheriting from a parent resource that exists (setting targetSDKVersion to at-least what library uses).

其次,最好将您的 targetSDKVersion 更改为最新的,并将 compileSDKVersion 更改为最新的.这就是人们在编写应用程序时通常会做的事情.每个人都希望所有新设备都能使用自己的应用程序.

Secondly it will be better to change your targetSDKVersion to the newest one and compileSDKVersion to the latest one. That is what one usually does when writing an application. Everyone wants to target all the new devices to be able to use one's application.

因此尝试更改目标并编译 SDKVerisons.将 SDKVersions 更改为最新版本.

So try changing target and compile SDKVerisons. Change SDKVersions to the latest one.

这篇关于添加 Android Image Cropper 库会引发错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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