AIDL file does not generate Java file

I have defined the AIDL android interface for providing services from other applications.

My problem is that in my Android project it does not generate a Java file from this AIDL. Please note that the project compiles and works fine. However, if I transfer this AIDL file to another project, Android generates a Java file.

I do not know where I can debug this error or where I can read several magazines about it.

Can someone help me?

+5
source share
5 answers

Eclipse .aidl, . , : public. . :

package com.example.phone.service;

interface IService {
    public void placeCall(String a, in String b, in String c);
}

:

package com.example.phone.service;

interface IService {
    void placeCall(String a, in String b, in String c);
}

, .java gen/ src/.

+5

. Android Studio, , Gradle.

helpl 'src/main/aidl/example/package/name/' < - helpl "package example.package.name".

, aidl , , helpl. : https://code.google.com/p/android/issues/detail?id=56328

+5

, . , , .

, Eclipse, "" ( "" > " " > "" ), .

+1

, , , framework/base/, make Android.mk .aidl ( , ), . " ".java.

+1

Android Studio. .

1:

AIDL src/main/aidl, gradle.

, .

2:

  • helpl .

  • build.gradle,

    sourceSets {
       main {
         aidl.srcDirs = ['src/main/java']
       }
    }
    

Remember to clean and restore after installation as described above.

See here for more information.

https://issuetracker.google.com/issues/36972230

https://issuetracker.google.com/issues/36972230

https://issuetracker.google.com/issues/36988483

0
source

All Articles