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 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。