Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import android support library in eclipse

I have imported sample project CastSampleActivity(Googlecast sampleapp for android) in eclipse. I import googlecastsdk manually,and import android support library by operating [Project]-[Android Tools]-[Add Support Library].

After Downloading [Android Support Library,revision 18],[android-support-v4.jar]is in [/libs].

However errors occured in 2 files,1 is CastSampleActivity.java;

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

1 is 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"

anyone haves answer?

like image 956
user2822062 Avatar asked Sep 09 '26 13:09

user2822062


1 Answers

Just in case the other answers didnt work, this is what worked for me: Project--Propertes--Android--Is Library--Add.. And added appcompat_v7_2

like image 135
Ivan_ug Avatar answered Sep 12 '26 03:09

Ivan_ug



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!