I was following this and stuck at "a. Navigate to src/main in the Project tool window."
Because I couldn't find src/main in my project structure (Neither in the explorer)
Like it is shown here:
I think it's because I'm working with a libGDX project.
I tried adding the Module directly under the src (As if I was not working in a android studio environment), but when I build my application, I don't see a generated file named IInAppBillingService.java anywhere.
If you open
build.gradle
in theandroid
folder of your project, you will see the following block of Gradle code:This block configures where Gradle looks for source files. LibGDX uses this to customize the directory hierarchy which is why you are unable to exactly follow the steps given in the Android documentation.
Now the line
aidl.srcDirs = ['src']
tells us that the project is configured so that all AIDL files can be placed directly in thesrc
folder. So you can modify the step to navigate tosrc/main
and instead just go directly tosrc
. Follow the rest of the instructions from there. If Android Studio balks at any step, you may have to go directly to the file system using the command line or your favorite file explorer in order to create the folders and files that you need.It appears you have done this and the second part (or maybe the primary part?) of your question is the location of the generated .java file from your AIDL source. Android Studio places all generated artifacts under the
build
directory. There is abuild
folder directly in the base directory of your project and one in each module. Search these for the generated file.