Android: Eclipse does not recognize AIDL file

I looked and looked, but Eclipse (3.6, with the Android Android SDK) just won't do anything with the AIDL file I created. The AIDL file is in the same place as another source, following the Java style. I read that Eclipse should just generate a stub for the interface declared in the AIDL file, but it does not appear in the gen folder or anywhere else I saw, and the project is not built because the specified interface in AIDL was not found. I suspect that I am doing something stupid or that I do not understand something, but as far as I looked and tried, I still do not understand, and Eclipse still fails.

My AIDL:

package com.example.helloandroid;

HOSPlayerInterface interface {public void playURL (String url); public boolean pause (); public boolean resume (); public void stop (); }

... and said that AIDL lives in the com / example / helloandroid directory. Eclipse does not recognize it, syntax is highlighted, AIDL works, etc. I'm at a loss. The Android plugin is installed and working, since I can create and run simple Android projects that do not require AIDL. Any help would be appreciated.

+4
source share
2 answers

Just remove the entire β€œpublic” access modifier before declaring the method. The following code works in my project.

package com.example.helloandroid; interface HOSPlayerInterface { void playURL(String url); boolean pause(); boolean resume(); void stop(); } 

If the helpl file cannot get compilation in Eclipse, delete the "gen" folder and rebuild the project.

+2
source

Any build errors? The IDE may exit before compiling your .aidl file due to parsing errors in XML or similar.

+1
source

All Articles