agentJJ 2017-09-13 04:07 采纳率: 0%
浏览 3286

Android Studio 添加百分比布局时出错 Failed to reslove 如何解决

在看《第一行代码》第二版按书上写的操作,导入百分比布局时出错。按网上的解决方法,尝试改了几个percent版本不好使。
在\Android\sdk\extras\android\m2repository\com\android\support\percent下打开**maven-metadata.xml**如下
<?xml version="1.0" encoding="UTF-8"?>

com.android.support
percent

25.3.1

22.2.0
23.0.0
23.0.1
23.1.0
23.1.1
23.2.0
24.0.0-alpha1
23.2.1
23.3.0
24.0.0-alpha2
23.4.0
24.0.0-beta1
24.0.0
24.1.0
24.1.1
24.2.0
24.2.1
25.0.0
25.0.1
25.1.0
25.1.1
25.2.0
25.3.0
26.0.0-alpha1
25.3.1

20170322231651


AS里的**build.gradle**文件如下
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.jingzi.uilayouttest"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android support:percent:24.0.0'
testCompile 'junit:junit:4.12'
}
更新时报错:**Error(27,13)Failed to reslove:com.android.support:percent:24.2.1**
请问应该如何解决?

  • 写回答

5条回答

  • Mr康 2017-09-13 05:52
    关注

    你没有24.2.1这个版本啊

    评论

报告相同问题?

悬赏问题

  • ¥15 为什么eprime输出的数据会有缺失?
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题