Dum*_*ong 56 android rendering android-appcompat
我安装了ALL Extra和SDK API 21-22,包括更改的compileSdkVersion 22到21 buildToolsVersion '22 .0.1'到21.1.2但是错误.
API 22和我的渲染问题仍然改为<= 21.
pri*_*ank 121
这些是您可以根据API需求在build.gradle中添加的正确版本.
API 24:
implementation 'com.android.support:appcompat-v7:24.2.1'
implementation 'com.android.support:recyclerview-v7:24.2.1'
Run Code Online (Sandbox Code Playgroud)
API 25:
implementation 'com.android.support:appcompat-v7:25.4.0'
implementation 'com.android.support:recyclerview-v7:25.4.0'
Run Code Online (Sandbox Code Playgroud)
API 26:
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
Run Code Online (Sandbox Code Playgroud)
API 27:
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
Run Code Online (Sandbox Code Playgroud)
fab*_*ozo 23
为了使工作我必须设置:
compile ("com.android.support:support-v4:22.2.0")
compile ("com.android.support:appcompat-v7:22.2.0")
compile ("com.android.support:support-annotations:22.2.0")
compile ("com.android.support:recyclerview-v7:22.2.0")
compile ("com.android.support:design:22.2.0")
Run Code Online (Sandbox Code Playgroud)
编译( "com.android.support:设计:22 2 0.0")
文档说明了一些不同的东西(docs):
com.android.support:支持 -设计:22.0 .0
小智 23
支持存储库的真实路径:
如果问题仍然存在:
转到支持存储库库的实际路径,并检查以下文件夹是否存在:
"ANDROID_SDK_DIRECTORY\extras\android\m2repository\com\android\support"
Run Code Online (Sandbox Code Playgroud)
在该文件夹中,存在无法找到的支持库.例如:
"ANDROID_SDK_DIRECTORY\extras\android\m2repository\com\android\support\appcompat-v7"
Run Code Online (Sandbox Code Playgroud)打开文件夹appcompat-v7,您会看到包含所有可用版本的文件夹 您应该在build.gradle文件依赖项中仅使用其中一个版本,或者使用+,例如.18.0 +
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:18.0.+'
compile 'com.android.support:gridlayout-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
}
Run Code Online (Sandbox Code Playgroud)这是从grade.build依赖项文件中获取的路径:
com.android.support:appcompat-v7:18.0.0
Run Code Online (Sandbox Code Playgroud)
请参阅硬盘上的真实路径 - >
ANDROID_SDK_DIRECTORY\extras\android\m2repository\com\android\support\appcompat-v7\18.0.0
Run Code Online (Sandbox Code Playgroud)
如果没有这样的文件夹,您将收到错误:
"failed to resolve com.android.support:appcompat-v7:18.0.0"
Run Code Online (Sandbox Code Playgroud)
ps 如果您使用的是Windows x64,则在安装sdk和jdk时,请确保安装路径没有Program Files(86).添加Windows的括号可能会导致解决项目路径的其他问题.使用简单路径作为安装文件夹.
例如:
c:\androidSDK\
Run Code Online (Sandbox Code Playgroud)
Pau*_*zke 17
找不到:com.android.support:appcompat-v7:22.0.0
"我真的尝试了其他一切"的答案:
如果您没有最新的Android支持库和Android支持存储库,也会出现此问题.只需使用SDK管理器安装即可.
连同其他提供的解决方案,确保在project / build.gradle中包含以下内容
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
177781 次 |
| 最近记录: |