所以我试图使用actionbarsherlock和vIEwpagerindicator,由于某种原因,vIEwpagerindicator库由于某种原因没有导入.任何人都有任何想法?
apply plugin: 'androID'androID { compileSdkVersion 19 buildToolsversion "19.0.1" defaultConfig { minSdkVersion 9 targetSdkVersion 19 versionCode 1 versionname "1.0" } buildTypes { release { runProguard false proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.txt' } }}repositorIEs { mavenCentral()}dependencIEs { compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' compile 'com.vIEwpagerindicator:library:2.4.0'}dependencIEs { compile project(':librarIEs:facebook')}
此导入错误“无法解析符号vIEwpageindicator
import com.vIEwpagerindicator.TabPageIndicator;
这些是我的“消息gradle任务”
Execution Failed for task ':app:processDeBUGResources'.> com.androID.IDe.common.internal.LoggedErrorException: Failed to run command: C:\androID-sdk\build-tools.0.1\aapt.exe package -f --no-crunch -I C:\androID-sdk\platforms\androID-19\androID.jar -M C:\myAppname\app\build\manifests\deBUG\AndroIDManifest.xml -S C:\myAppname\app\build\res\all\deBUG -A C:\myAppname\app\build\assets\deBUG -m -J C:\myAppname\app\build\source\r\deBUG -F C:\myAppname\app\build\libs\app-deBUG.ap_ --deBUG-mode --custom-package com.myAppname.app --output-text-symbols C:\myAppname\app\build\symbols\deBUGError Code: 1Output: C:\myAppname\app\build\res\all\deBUG\values\values.xml:911: error: Error: No resource found that matches the given name: attr 'vpiTabPageIndicatorStyle'. C:\myAppname\app\build\res\all\deBUG\values\values.xml:914: error: Error retrIEving parent for item: No resource found that matches the given name 'Widget.TabPageIndicator'. C:\myAppname\app\build\res\all\deBUG\values\values.xml:934: error: Error: No resource found that matches the given name: attr 'fadeDelay'. C:\myAppname\app\build\res\all\deBUG\values\values.xml:933: error: Error: No resource found that matches the given name: attr 'fadeLength'. C:\myAppname\app\build\res\all\deBUG\values\values.xml:931: error: Error: No resource found that matches the given name: attr 'selectedcolor'.C:\myAppname\app\src\main\res\values\styles.xml No resource found that matches the given name: attr 'vpiTabPageIndicatorStyle'. Error retrIEving parent for item: No resource found that matches the given name 'Widget.TabPageIndicator'. No resource found that matches the given name: attr 'fadeDelay'. No resource found that matches the given name: attr 'fadeLength'. No resource found that matches the given name: attr 'selectedcolor'.
解决方法:
您无法通过导入VIEwPagerIndicator
compile 'com.vIEwpagerindicator:library:2.4.0'
因为Maven工件只是Java库的一个jar,但是VPI依赖于jar中没有的AndroID资源.
具有AAR打包的Maven工件确实具有资源并且可以工作,但VPI不是这样打包的.它有apklib包装,但AndroID Gradle插件不支持.
您需要下载源代码并将其设置为android-library模块.
您没有具体说明您正在运行的AndroID Studio版本,但我愿意打赌您导入的问题不起作用的原因是您运行的是早于0.4.3的内容;从那时起,该区域就已经修复了错误.
总结以上是内存溢出为你收集整理的Gradle – 无法使用gradle依赖项在Android Studio中导入viewpagerindicator全部内容,希望文章能够帮你解决Gradle – 无法使用gradle依赖项在Android Studio中导入viewpagerindicator所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)