Package Details: android-apktool 3.0.3-1

Git Clone URL: https://aur.archlinux.org/android-apktool.git (read-only, click to copy)
Package Base: android-apktool
Description: A tool for reengineering Android apk files
Upstream URL: https://github.com/iBotPeaches/Apktool
Licenses: Apache-2.0
Submitter: TamCore
Maintainer: Muflone
Last Packager: Muflone
Votes: 260
Popularity: 1.50
First Submitted: 2010-10-25 15:09 (UTC)
Last Updated: 2026-07-19 21:06 (UTC)

Dependencies (3)

Sources (1)

Latest Comments

1 2 3 4 5 6 .. 10 Next › Last »

raxod502 commented on 2026-10-01 16:56 (UTC)

Since it seems the package is compatible with a range of Java environment versions, perhaps it would make sense to declare the makedepends with upper and lower bounds as opposed to an exact version?

jakubvalenta commented on 2026-10-01 16:28 (UTC)

The package depends on java-environment 26, which is not available in extra. The current version is 27. I didn't feel like pulling it from AUR, so I made locally this change to the PKGBUILD to use the default java-environment, which gradle depends on, and the package compiles fine:

--- PKGBUILD.orig   2026-07-19 23:06:39.000000000 +0200
+++ PKGBUILD    2026-10-01 18:19:19.913111079 +0200
@@ -4,19 +4,17 @@
 pkgname=android-apktool
 pkgver=3.0.3
 pkgrel=1
-_jdkver=26
 pkgdesc="A tool for reengineering Android apk files"
 arch=("any")
 url="https://github.com/iBotPeaches/Apktool"
 license=("Apache-2.0")
 depends=("java-runtime")
-makedepends=("java-environment=${_jdkver}" "gradle")
+makedepends=("gradle")
 source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/iBotPeaches/Apktool/archive/refs/tags/v${pkgver}.tar.gz")
 sha256sums=('22b577d080ca53381c61cbeade7d80ff7a5f365faeb469ec80b2bce6bdd1f763')

 build() {
   cd "Apktool-${pkgver}"
-  export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk"
   gradle build --no-daemon shadowJar proguard
 }

@@ -27,4 +25,3 @@
   install -d -m 755 "${pkgdir}/usr/bin"
   ln -s "/usr/share/${pkgname}/apktool" "${pkgdir}/usr/bin/apktool"
 }

weltio commented on 2026-09-27 09:39 (UTC)

_jdkver hardcoded is not cool :(

inkOrCloud commented on 2026-04-27 01:22 (UTC)

The upstream project now supports JDK 26; it is recommended to add relevant support in the PKGBUILD

Tyilo commented on 2026-01-15 10:24 (UTC)

I couldn't get the gradle8 AUR package to build, but using @kriskras99 solution worked for me:

diff --git a/PKGBUILD b/PKGBUILD
index 5086993..b3e07af 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,14 +10,14 @@ arch=('any')
 url="https://github.com/iBotPeaches/Apktool"
 license=('Apache-2.0')
 depends=('java-runtime')
-makedepends=("java-environment=${_jdkver}" 'gradle8')
+makedepends=("java-environment=${_jdkver}")
 source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/iBotPeaches/Apktool/archive/refs/tags/v${pkgver}.tar.gz")
 sha256sums=('f23230a102b762f5349896308d9d57fe3fd95cb2f3ad4426286a1f918680cec1')

 build() {
   cd "Apktool-${pkgver}"
   export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk"
-  gradle8 build --no-daemon shadowJar proguard
+  ./gradlew build --no-daemon shadowJar proguard
 }

 package() {

raxod502 commented on 2025-12-29 21:52 (UTC)

If we use ./gradlew instead of gradle8, then it would decrease the number of AUR dependencies required by one, and in addition it would reduce future build failures because we would use exactly the version of Gradle supported by upstream. Would this be an acceptable change?

painfularch commented on 2025-11-30 15:29 (UTC)

can't build with jdk21-temurin package, I suspect line 19 is the culprit:

export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk"

could you please just use the default jdk21 provided by the system? java-runtime=21 is already enforced by makedepends.

flocke commented on 2025-11-01 13:15 (UTC)

It looks exactly like @kriskras99 says, apktool is apparently not compatible with gradle 9 yet.

Just switching back to gradle 8 works fine:

diff --git a/PKGBUILD b/PKGBUILD
index fb63190..a26dd17 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,14 +10,14 @@ arch=('any')
 url="https://github.com/iBotPeaches/Apktool"
 license=('Apache-2.0')
 depends=('java-runtime')
-makedepends=("java-environment=${_jdkver}" 'gradle')
+makedepends=("java-environment=${_jdkver}" 'gradle8')
 source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/iBotPeaches/Apktool/archive/refs/tags/v${pkgver}.tar.gz")
 sha256sums=('d87a589778d4369362a99c83a67ca3d365891395aba1be1b85dbf04e72cd3298')

 build() {
   cd "Apktool-${pkgver}"
   export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk"
-  gradle build --no-daemon shadowJar proguard
+  gradle8 build --no-daemon shadowJar proguard
 }

 package() {

kriskras99 commented on 2025-10-13 14:22 (UTC)

The build succeeds when replacing gradle with ./gradlew on line 20. The wrapper uses Gradle 8.7, so Apktool is most likely not compatible with Gradle 9.