简体   繁体   English

在Android中将SDK版本更新为24.3后,所有库均显示错误

[英]All libraries are showing error after updating SDK version to 24.3 in Android

All libraries ware fine before updating the sdk. 在更新SDK之前,所有库都可以正常运行。 Just now I update the sdk through sdk manager and everything is out of control now. 刚才我通过sdk管理器更新了sdk,现在一切都失去了控制。 All libraries are showing only one cross mark on its folder and no error inside. 所有库的文件夹上仅显示一个十字标记,内部没有错误。 I have taken some images to show something here. 我已经拍了一些照片,在这里展示了一些东西。

v7 lib: v7库:

在此处输入图片说明

Unfortunately I couldn't found any issue inside the library. 不幸的是,我在库中找不到任何问题。

google-play-service-lib: google-play-service-lib: 谷歌播放服务库

same issue. 同样的问题。

Fortunately I have found some errors in Error Log, but its not sufficient for me to resolve. 幸运的是,我在错误日志中发现了一些错误,但不足以解决。 在此处输入图片说明

Android SDK Manager: Android SDK Manager:

在此处输入图片说明

The main issue is it deleted all R.Java classes from all projects in which these libraries are involved. 主要问题是它从涉及这些库的所有项目中删除了所有R.Java类。

Can anyone knows how to resolve this problem. 任何人都知道如何解决此问题。

Happened with me also .. somehow the files mainly ( R.java ) got corrupted after latest sdk update, that's why you can observe support library name also changed from appcompat_v7 to android-support-v7-appcompat . 我也遇到了..在最近的sdk更新之后,主要是文件( R.java )损坏了,这就是为什么您可以观察到支持库名称也从appcompat_v7更改为android-support-v7-appcompat的原因

Solution that worked for me is remove all the libraries from workspace which have error & re-import them to my workspace. 对我有用的解决方案是从工作区中删除所有有错误的库,然后它们重新导入到我的工作区中。

For example - for importing support library appcompat_v7 , re-import it from your sdk location: 例如 ,要导入支持库appcompat_v7 ,请从您的sdk位置重新导入它:

(\\adt-bundle-windows-x86-20140702\\sdk\\extras\\android\\support\\v7\\appcompat) (\\ adt-bundle-windows-x86-20140702 \\ sdk \\ extras \\ android \\ support \\ v7 \\ appcompat)

Likewise do re-import for other corrupted libraries. 同样,请为其他损坏的库重新导入

Finally I solved the issue by deleting two apis ie API 22(Android M) and Tools. 最后,我通过删除两个API(即API 22(Android M)和工具)解决了该问题。 Don't know why the issue is coming after installing these APIs. 不知道安装这些API后为什么会出现此问题。 After all I'm able to get R.java classes and recompile the apps. 毕竟,我能够获得R.java类并重新编译应用程序。 I have attached a image of both packages after deleting. 删除后,我已附上两个软件包的图像。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM