简体   繁体   English

我无法使用Android Studio中导入的库中另一个类的方法

[英]I can't use methods from another class from imported libraries in Android Studio

I used 我用了

dependencies {
    compile 'com.macroyau:thingspeakandroid:0.2.0'
}

to download the external libraries I need. 下载我需要的外部库。 I created an instance of one of the classes of the lib and upon calling the methods, it seems I can only call the interfaces instead of the actual methods as you can see here! 我创建了lib的一个类的实例,并且在调用方法时,似乎只能调用接口,而不能调用实际的方法!

在此处输入图片说明

It's the first time I am using Android Studio, is it the right way to import external libraries? 这是我第一次使用Android Studio,这是导入外部库的正确方法吗?

Properly add the library by adding new module in android studio File->New->New Module->Android Library Choose the path where you downloaded the library. 通过在android studio中添加新模块来正确添加库。File-> New-> New Module-> Android Library选择您下载库的路径。

Then add the dependency and rebuild it. 然后添加依赖项并重建它。 Check the errors if any 检查错误(如果有)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM