Android Forum » Android Developer Forum » Android Developer Forum (general) » Compilation of the AndroidPit Licence Library
Compilation of the AndroidPit Licence Library
created on Jan 6, 2011 1:16:11 PM
I have an application which uses the market's LVL. I would like to add the AndroidPit licensing support to be able to sell it via others means.
I have a problem with the compilation of the AndroidPit lib, especially with the aidl file since it is not converted in a java file in the gen folder during compilation, which leads to errors.
I have even restarted from scratch with a new workspace, and a brand new installation of the sdk. The problem arise in my x64 windows 7 an on my x64 Ubuntu too.
Mybe i'm doing something wrong. Here is how I proceed:
Start with an empty workspace, new project from sources, import the LVL and check it is considered as a lib in the android properties.
Then, import-> import existing project into workspace -> select AndroidPit lib, then ok.
Then, i go in the android properties of the lib to input the correct LVL path for my system.
At this point, it should compile without error, but I have the
"Errors occurred during the build.
Errors running builder 'Android Pre Compiler' on project 'androidpit-licensing-lib'.
at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.handleAidl(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(Unknown Source)
Is there anyone here with a solution ?
created on Jan 6, 2011 1:23:13 PM
it seems that the ADK does failes to compile the interface files for communicating with our AppCenter. Do you use the most recent version of the Google ADK Plugin and of the SDK?
created on Jan 6, 2011 1:37:12 PM
Yes I have the latest tools from Google.
I also have another app with aidl which compile just fine!
So my system is able to compile aidl files. I've tried to delete the gen folder of the lib to force refresh without success.
created on Jan 6, 2011 1:53:46 PM
A quick solution would be that you compile the AIDL file by hand, copy the generated java file into the src directory and delete the aidl file afterwards. But you can send me an email to <my firstname>.<my lastname>@androidpit.de with the project so that I can have a look to.
created on Jan 13, 2011 8:15:04 PM
Ok, I've finally succeed in compiling the library. After a whole clean install of Eclipse/AndroidSDK, the problem was still here. I've remade another project, and remade the lib project, file by file. At the end, I works!
So I think this is some kind of eclipse project hidden file that created this behavior.
Thanks for your support!
created on Jan 13, 2011 11:40:07 PM (via AndroidPIT app)
Are you using the 32 bit version of the java SDK? I've heard Android needs the 32 not x64 version of java.
created on Jan 14, 2011 1:25:07 AM
— modified on Jan 14, 2011 1:26:54 AM
Indeed, I use the x64 version of the Java SDK. There is no problem with running Android SDK with 64 bit JRE and JDK. Now, on windows, the SDK manager has an installer which is buggy and don't see the x64 JRE (it is a reg problem, not a real x64 thing). Before, there was no installer and the dev went fine after a mere copy in a directory (and some PATH adjustments).
I don"t know if it is a x64 problem. All I've done to solve the issue was to "rewrite" the lib like it was created, without copying files. And it works flawlessly now!
Note that the error was a eclipse error, and not a compilation or execution error. It may be related to the exchange of file between 32 and 64 bits versions of Eclipse. A 32bit hidden file of Eclipse project may create a condition where the 64bit version is unable to call the precompiler and process the aidl.
So to resume, I use a 64bit version of Java to run a 64bit version of Eclipse on a x64 windows. I don't say that it is better than 32bit!
http://developer.android.com/sdk/requirements.html doesn't say that a 32bit SDK is mandatory...
created on Jan 14, 2011 7:37:21 AM
I don't use eclipse, but I had remembered I ran into a problem with the x64 version of java before; and had to use the 32 bit version. I think the problem I had was similar to this: http://savagelook.com/blog/android/android-sdk-windows-installer-jdk-64-bit-fail
created on Jan 22, 2011 1:46:37 PM
Had the same problem yesterday and finally figured out how to solve it.
The license library references resources that are not preset on everyones system.
In the preferences of the project there is a strange reference to a path inside the googl LVL ending with a numeric suffix.
After correcting this reference to the real path in my Android SDK it worked instantly.
Maybe this is something that could be fixed in the distribution.
I read about similar problems in the german forum.