Apktool: xml file build error: brut.common.Br utException: could not exec (exit code = 1)

Created on 25 Jan 2018  路  2Comments  路  Source: iBotPeaches/Apktool

Information

  1. *Apktool Version 2.3.1 * -
  2. Operating System (Windows) -
  3. APK From? (by myselft) -
    AndroidStudio3.0.1

1.build.gradle

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.test.text"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

}

  1. gradle-wrapper.properties
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists

    distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

Stacktrace/Logcat

F:Exe>apktool_2 b Test
I: Using Apktool 2.3.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: F:ExeTestreslayout-v26abc_screen_toolbar.xml:5: error: No
resource identifier found for attribute 'keyboardNavigationCluster' in package
'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec (exit code = 1): [C:User
sJefAppDataLocalTempbrut_util_Jar_1347218509927599444.tmp, p, --forced-pack
age-id, 127, --min-sdk-version, 14, --target-sdk-version, 26, --version-code, 1,
--version-name, 1.0, --no-version-vectors, -F, C:UsersJefAppDataLocalTemp
APKTOOL3021146629217663391.tmp, -0, arsc, -0, arsc, -I, C:UsersJefAppDataLoc
alapktoolframework1.apk, -S, F:ExeTestres, -M, F:ExeTestAndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)
at brut.androlib.Androlib.buildResources(Androlib.java:426)
at brut.androlib.Androlib.build(Androlib.java:305)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec (exit code = 1): [C:UsersJefAppDataLocalTempbrut_util_Jar_1347218509
927599444.tmp, p, --forced-package-id, 127, --min-sdk-version, 14, --target-sdk-
version, 26, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, C
:UsersJefAppDataLocalTempAPKTOOL3021146629217663391.tmp, -0, arsc, -0, ars
c, -I, C:UsersJefAppDataLocalapktoolframework1.apk, -S, F:ExeTestres, -M, F:ExeTestAndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:456)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:Users
JefAppDataLocalTempbrut_util_Jar_1347218509927599444.tmp, p, --forced-packag
e-id, 127, --min-sdk-version, 14, --target-sdk-version, 26, --version-code, 1, -
-version-name, 1.0, --no-version-vectors, -F, C:UsersJefAppDataLocalTempAP
KTOOL3021146629217663391.tmp, -0, arsc, -0, arsc, -I, C:UsersJefAppDataLocal
apktoolframework1.apk, -S, F:ExeTestres, -M, F:ExeTestAndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:450)
... 6 more

Include stacktrace here

Steps to Reproduce

  1. apktool

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it.
I just make a empty activity with android studio 3.0.1, build a released version, an then "apktool d" and "apktool b" it.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything?
    change nothing include decompiled content.
  2. If you are trying to install a modified apk, did you resign it?
    NO ,do nothing.
  3. Are you using the latest apktool version?
    Yes, 2.3.1

Most helpful comment

I made it! Thank you very much!

All 2 comments

This error says it all

W: F:\Exe\Test\res\layout-v26\abc_screen_toolbar.xml:5: error: No
resource identifier found for attribute 'keyboardNavigationCluster' in package
'android'

Make sure you have frameworks up to date. Run apktool empty-framework-dir to automate this.

I made it! Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings