java – Android . The AAR library interface parameter name is missing

I use Android studio (1.2.2) I built an Android module library, which declares an interface:

public interface myInterface {
    void onSuccess(String returnedId);

    void onFailure(Exception e);
}

I compile the project and get it from the build / outputs / AAR / directory AAR file Then I will AAR import to include import Jar or In the project of AAR package I set it as a module dependency and import the interface into the class I want to use it

The problem is that when I want to use the imported interface, autocomplete does not use the descriptive name I set when building the library to complete the interface variable Goint to imported According to the Declaration on the interface in the AAR file, I found that:

public interface myInterface {
       void onSuccess(String var1);

       void onFailure(Exception var1);
 }

What I want is:

What did I get:

Solution

. The AAR file contains only the compiled code (. The. Class file in the jar file)

If you want to view the real parameter names in Android studio, you must tell Android studio where it can find the source code of your library (*. Java file)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>