Question

I create Android project with plugins. When I create simple AIDL file, the compilation breaks with strange errors and no interface class is generated.

My AIDL file:

package com.android.example.tryplugin
interface IResPlugin {
    Bundle onClick( in int id, in int state );
}

I have the following errors:

syntax error don't know what to do with "package"   
syntax error don't know what to do with "com.android.example.tryplugin" 
syntax error don't know what to do with "package"

I have also tried all advices from Google like "Try to clean and recompile", "Create new project with these files" etc. What is wrong with it?

Was it helpful?

Solution

I met the similar problem before, but the cause is not same with your, the AIDL file used the CR as line break on my Windows platform, the AIDL parser could not handle it and kept crashing. The parser worked well after I changed the CR to CR LF combination.

Hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top