AIDL files not building in Eclipse in random projects?

后端 未结 3 2033
遇见更好的自我
遇见更好的自我 2021-01-28 19:31

I\'ve got some AIDL files which I want to include in a project, however Eclipse seems to work differently on different projects.

I\'m developing an SDK for an applicatio

3条回答
  •  执念已碎
    2021-01-28 20:22

    From my experience you create the .aidl file in your project (make sure your included packages are correct - you will get an error if not). If the .aidl file is good a .java file will be created in the gen/ directory under the correct package name.

    Next you must connect your java code to the interface using

    .Stub myAidlInterface = new .Stub() {
    
        // Your AIDL interface methods will appear in here and can now be used
        // in your application as myAidlInterface.methodName();
    }
    

    Hope this helps.

提交回复
热议问题