Simple Android project for Debian's SDK
In Android app compilation, you have two paths: Gradle or Ant.
So you want to use Gradle
Paul was able to make it work with Debian's packages alone back in the day. However, Paul's way no longer works, at least until Debian's packages get some major updates.
Kai-Chung suggests using
./gradlew (the Gradle wrapper) with upstream Gradle downloaded from Maven/JCenter/Google via rules in
build.gradle rather than simply calling
gradle build. This is the way most apps do it, though in my opinion, it's not the Debian way.
So you want to use Ant
Ant doesn't download anything from the Internet, and Kai-Chung also implies that it might work with Debian's Android SDK. Huzzah! That's how apps were built before all this "Android Studio" nonsense. I will attempt to make this project work with Ant before resorting to the Gradle wrapper.
So you want to see what broke
Note: What follows is the original readme from when I foolishly believed that
gradle build was working with Debian's Android SDK.
This is an Android project (currently broken) with the goal of compiling on Debian-derived distros using only a few packages. For this to work, you will need a distro from 2018 or later.
sudo apt install android-sdk android-sdk-platform-23 android-sdk-helper gradle default-jdk
Google's Android SDK Manager is a dumpster fire. We can do better, and I deserve better as a developer. There is a Debian project to package significant parts of the Android SDK, but unfortunately it lacks adequate documentation and tutorials.
Here are some links which provided the basic information to get this project started:
More information on basic Android concepts:
This project is supposed to be a minimal example that opens an empty
View on an Android device. To build, run:
Builds are currently failing. Error is:
* What went wrong: A problem occurred configuring root project 'debian-android-simple'. > Could not resolve all files for configuration ':classpath'. > Could not find javax.xml.bind:jaxb-api:debian. Searched in the following locations: file:/usr/share/maven-repo/javax/xml/bind/jaxb-api/debian/jaxb-api-debian.pom file:/usr/share/maven-repo/javax/xml/bind/jaxb-api/debian/jaxb-api-debian.jar Required by: project : > com.android.tools.build:gradle:debian > com.android.tools.build:gradle-core:debian > com.android.databinding:compilerCommon:debian > Could not find com.ibm.icu:icu4j:debian. Searched in the following locations: file:/usr/share/maven-repo/com/ibm/icu/icu4j/debian/icu4j-debian.pom file:/usr/share/maven-repo/com/ibm/icu/icu4j/debian/icu4j-debian.jar Required by: project : > com.android.tools.build:gradle:debian > com.android.tools.build:gradle-core:debian > com.android.databinding:compilerCommon:debian > org.antlr:antlr4:debian