其他分享
首页 > 其他分享> > 无法在eclipse中导入android支持库

无法在eclipse中导入android支持库

作者:互联网

我在eclipse中导入了示例项目CastSampleActivity(Googlecast sampleapp for android).
我手动导入googlecastsdk,并通过操作[Project] – [Android Tools] – [Add Support Library]导入android支持库.

下载[Android支持库,修订版18]后,[android-support-v4.jar]在[/ libs]中.

但是,在2个文件中发生错误,1是CastSampleActivity.java;

"The import android.support.v7.app cannot be resolved"
"The import android.support.v4 cannot be resolved"

1是cast_sample.xml;

"No resource identifier found for attribute 'showAsAction' in package 'com.example.castsample'  cast_sample.xml /CastSampleActivity/res/menu    line 4  Android AAPT Problem"
"No resource identifier found for attribute 'actionProviderClass' in package 'com.example.castsample'   cast_sample.xml /CastSampleActivity/res/menu    line 4  Android AAPT Problem"

有人有答案吗?

解决方法:

为了防止其他答案无效,这对我有用:
项目 – 属性 – Android – 是图书馆 – 添加..
并添加了appcompat_v7_2

标签:google-cast,android,eclipse
来源: https://codeday.me/bug/20190831/1776102.html