how can I add the aidl file to Android studio (from the in-app billing example)

后端 未结 10 749
我寻月下人不归
我寻月下人不归 2020-11-27 11:45

I am currently migrating an Eclipse app to Android Studio. This app was using the in app billing.

My main problem is to compile the project and the aidl file (I gues

10条回答
  •  清酒与你
    2020-11-27 12:26

    The above answers concentrate on file location, but it appears you already had that set correctly. I experienced this same issue in Android Studio, but none of the listed answers resolved it, and I banged my head against it for an hour. Eventually, I realized that I was missing an obvious import:

     import com.android.vending.billing.IInAppBillingService;
    

    Once I added that it resolved this error message.

    This import isn't mentioned in any of the Google Billing docs or included in any of the code examples that I found. While it may be obvious to experienced Java developers, beginners just trying to learn their first project may need it explicitly pointed out.

提交回复
热议问题