0

I've been using AIDE with Libgdx to make a game. The problem is that when you create a Libgdx project in AIDE the project structure is different, for instance there are no build.gradle files, only .classpath and .project files, which look different. I've managed so far by luckily finding instructions for adding the specific libraries I've needed using the .classpath files. Can anybody explain to me how one would go about translating how a dependancy should look in a build.gradle file to how it should look in a .classpath file. For instance I'm trying to add the Google Play Billing library to my project which is said should look like this in my build.gradle file:

dependencies {
    def billing_version = "5.0.0"

    implementation "com.android.billingclient:billing:$billing_version"
}

How should that look in a .classpath file, or how would I go about adding that to my .classpath file, or my project in general. So far I think I've had to always copy the libraries to my project manually, I'm thinking for some reason I can't access remote repositories, only local ones. Am I wrong about that, is there a way to access them without copying them to the project manually.

Michael
  • 33
  • 8
  • Normally, `classpath` stuff in Java means you add .class or .jar files as sources of compiled (byte)code. Gradle dependencies link to the sources of libraries and usually do not contain ready-to-use .jar or .class files - Gradle manages that (builds .jars for you and adds them to the classpath). If AIDE does not have Gradle / Maven / Ant integration (according to https://www.android-ide.com/tutorial_androidstudio.html, it does not), you should build those libraries by yourself somehow. Also, I may be wrong (never used AIDE) so leaving it as a comment instead of an answer – therainycat Nov 07 '22 at 01:36
  • It does have Gradle when in a standard project instead of a Libgdx project, but it has a lot of issues, I think it uses an older version of Gradle or something, it only downloads certain dependencies, or a lot of dependencies wont be fully downloaded, they will be missing files, if they're even downloaded at all. And you can try to specify a higher gradle version but it doesn't make a difference, I don't think it actually uses the later gradle versions when you tell it to, I think it's only able to use the earlier ones. But yeah thank you for the reply. – Michael Nov 08 '22 at 23:00
  • I had already tried finding a jar file for the BillingClient library but could only find pom and aar files, is there a jar file for it somewhere, or is there a way to use pom or aar files, or to make a jar file from the contents of the pom or aar files – Michael Nov 08 '22 at 23:00
  • https://stackoverflow.com/questions/21417419/how-to-convert-aar-to-jar – therainycat Nov 09 '22 at 00:04

0 Answers0