无法从.aar文件访问类 [英] Not able to access class from .aar file
本文介绍了无法从.aar文件访问类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I want to access methods of a class which reside inside a .aar
file.
I am following @PoliceEstebi's answer from how to import .aar file.
但是我仍然无法从.aar
文件访问类方法.
But still I am not able to access class methods from the .aar
file.
如果有人可以帮助,那就太好了!
If anyone can help that would be great!
推荐答案
最后,即使在Gradle 1.1.0上,我也找到了解决方案. 我从
Finally I found solution even on Gradle 1.1.0. I found help from Here by @AliDK answer.
在app
中通过名称aar
创建一个文件夹.
create a folder in app
by name aar
.
从myLibrary.aar
复制并放入app/aar
.然后
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
allprojects {
repositories {
jcenter()
flatDir {
dirs 'aar'
}
}
}
并在MyProject/app > build.gradle
dependencies {
...
compile(name: 'myLibrary', ext: 'aar')
}
花了两天后,它对我有用.
And it worked for me after spending 2 days.
感谢@AliDK.
我希望它也对其他人有用.
I hope it would work for others too.
这篇关于无法从.aar文件访问类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文