Compilation of the AndroidPit Licence Library

  • Replies:8
  • OpenNot stickiedAnswered

Jan 6, 2011 1:16:11 PM via Website

Hi everybody.

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'.
java.lang.NullPointerException
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)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)"

Is there anyone here with a solution ?

Thanks!

Deactivated Account

Jan 6, 2011 1:23:13 PM via Website

Hi RabugenTom,

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?

Regards,
Carsten

Seid nett zueinander: AndroidPIT-Regeln ;)

Jan 6, 2011 1:37:12 PM via Website

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.

Deactivated Account

Jan 6, 2011 1:53:46 PM via Website

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.

Best regards
Carsten

Seid nett zueinander: AndroidPIT-Regeln ;)

Jan 13, 2011 8:15:04 PM via Website

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!

Jan 14, 2011 1:25:07 AM via Website

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...

— modified on Jan 14, 2011 1:26:54 AM

Jan 22, 2011 1:46:37 PM via Website

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.

Regards,
Rafael