解决Android Studio打开他人包时出现Failed to find: com.android.support:appcompat

编程入门 行业动态 更新时间:2024-10-22 14:34:45

解决Android Studio打开他人包时出现<a href=https://www.elefans.com/category/jswz/34/1770925.html style=Failed to find: com.android.support:appcompat"/>

解决Android Studio打开他人包时出现Failed to find: com.android.support:appcompat

解决Android Studio打开别人包时出现Failed to find: com.android.support:appcompat-v7:21.

Error:Failed to find: com.android.support:appcompat-v7:21.+ Install Repository and sync project

首先在Gradle Scripts下是否含有build.gradle(Moduel.app),若没有则将build.gradle(Project…)下的

dependencies {compile fileTree(include: ['*.jar'], dir: 'libs')compile files('libs/pushservice-4.5.3.48.jar')compile 'com.android.support:appcompat-v7:22.2.1'
}```
####屏蔽掉,然后rebuild,然后待出来build.gradle(Moduel.app)后,修改里面的代码
```javaandroid {compileSdkVersion 22 //主要是修改这里,这里的修改时根据打开sdk管理器下的 //build-tools来设定值的 buildToolsVersion "22.0.1" 
 defaultConfig {applicationId "com.example.zhonghang.mypushdemo"minSdkVersion 15//这里targetSdkVersion 22versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } 
 
dependencies {compile fileTree(include: ['*.jar'], dir: 'libs')compile files('libs/pushservice-4.5.3.48.jar')compile 'com.android.support:appcompat-v7:22.2.1'
}

然后在file -> Project Structrue->选中要打开的工程->dependence->右边加号->第一个,然后查找appcompat的包。

操作完之后,然后rebuild之后就可以正常打开了。





















转载于:.html

更多推荐

解决Android Studio打开他人包时出现Failed to find: com.android.support:appcompat

本文发布于:2024-02-06 04:15:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1746134.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Failed   Studio   Android   find   appcompat

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!