Android Support Library v7 missing appcompat

2019-08-08 09:45发布

So when I import the Android Support Library v7 (appcompat JAR), I see that I get a noclassdeferror when trying to use it. This is because the package android.support.v7.appcompat is not being found as it is not even there in appCompat.JAR. I confirmed this by extracting the contents of the JAR file. I tried reinstalling the JAR with SDK Manager, however I am missing the same package every time. Can someone tell me what's going wrong?

Thanks

3条回答
狗以群分
2楼-- · 2019-08-08 09:53

You need to import support

dependencies {
    ...
    implementation "com.android.support:support-core-utils:28.0.0"
}
查看更多
等我变得足够好
3楼-- · 2019-08-08 09:59

Also had this problem. Yes, I knew I need to use the SDK Manager dialog to download the support library from the extras folder, as per the Support Library Set-up link, but it wasn't listed there - there is only the "support repository".

The problem is that it is hidden by default, as it has been deprecated. You need to check the "show: obsolete" checkbox. And then it's available to download.

查看更多
老娘就宠你
4楼-- · 2019-08-08 10:02

You have to import the appcompat library in to your project...please check the following link for getting how to setup appcompat in your project..

https://developer.android.com/tools/support-library/setup.html

thank you

查看更多
登录 后发表回答