android - How do I use AIDL tool from command line using SDK sample code? -


My questions using the command line helpl.exe (on Windows system) from this command line with something like eclipse, netbeans etc. Not even there.

The following three AIDL definition files are included with the Android SDK:

IRemoteService.aidl IRemoteServiceCallback.aid ISecondary.aidl

is located in the following directory:

C: \ android-sdk-windows \ platform \ android-2.1 \ samples \ apiDemos \ src \ com \ example \ android \ apis \ app

For simplicity, Aidl.exe is copied. Then, from the console window, I successfully used the following two commands to generate .java files:

C: \ Android-project \ ApiDemos \ src \ com \ example \ Android \ API \ app > ADL Iermet service service ADL C: \ Android-Project \ APIDomos \ src \ Comm \ Examples \ Android \ API \ AP> ADL Iscondary ADL

The commands, respectively, files, IRMMTSWireClock Java and Isacondari. Produced Java. So far so good.

Let me note that both .adl files are simple; No 'import' statement is included in this.

Balance. In the ADL file, IRMMTSyvaid., The following import statement contains the following:

Import com.example.android.apis .app.IRemoteServiceCallback;

The problem occurs when I run the AIDL tool on this file:

  c: \ Android-project \ apiomos \ src \ com \ example \ android \ apis app > ADD IRMMTS service ADL  

By doing this, the following error message can be printed in the console window:

IRemoteService.aidl: 19: couldn class com.example.android.apis Import not found for .app.irimoteServiceCallback

AIDL tool clearly did not find the IRMTS servicecaleback.All file in the same directory in which it was running. According to the "use" message of the AIDL device, there is a command that can be used to apparently solve this problem:

  -i & lt; DIR & gt; Search path for import statement  

Problem: I have not been able to specify I-E in such a way that to avoid error message and from AIDL tool 'Import' statement (Note: I set the window environment variable 'path' in my current directory.) Here are some differences I have tried:

  - IC: \ com \ example \ Android \ apis \ app-ic: / com / example / android / apis / app-ii  

It is surprising that I should remember something easy, although I have seen variations of this question posted at various places, I have used the AIDL command line (ADL.exe) In addition to information) no reply or any document has been found.

I've got the solution:

You must provide the folder path to the source files, but the path After the path of the base without the path Therefore, the correct order in your case is: C: \ Android-project \ ApiDemos \ src \ com \ example \ android \ apis \ app aidl -IC: \ Android-project \ ApiDemos \ src \ IRemoteService.aidl


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -