Need to upgrade gradle to build

I am running the latest DAB and am setting up a new project. Looks good but when compiling, I get this:

“No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android”

This is mentioned on Stackoverflow here:

And the solution is given as:

Upgrade android gradle plugin to 3.1 or newer.

Inside my build.gradle I find stuff like this:

dependencies {
    classpath 'com.android.tools.build:gradle:2.3.0'
}

I have a full and up-to-date Android Studio elsewhere on my machine, and there the gradle used is version 3.2.1.

I do not see any “button” in DAB to update gradle but will gladly follow instructions. Not afraid of the command line. I found the advice given in the console-output from DAB a bit mean where they say things like

“* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.”

But I found the buildapp.bat and could indeed add --info for starters but learnt that each time I hit the button Build Android App, the batch-file gets re-created. Still making progress, so do not hesitate to give me direct instructions, no need for click-by-click.

I could also try copying something over from my Android Studio, but would like the App Builder whisperers to tell me if that is possible and what to grab where and also where to put it.

Thank you.

Yes that warning occurs but it does not prevent the build finishing. I assume you are getting a working app at the end. Is that correct?

DAB is not aimed at developer but at non developers. So we don’t provide anything more than workaround solutions. Your issue is not a show stopper.

The next version will be out in January. It will have an updated build system.

1 Like

No, sorry to report that the build fails - otherwise I would not have bothered you. See my console output below.

I would not mind pulling a fresh clean sdk and installing it somewhere separate from the sdk which I have for my Android Studio. For that would you please advice me which version will work with my DAB which is version 3.1 from March 2018.

I did a pre-trial earlier in 2018 and it did run and made apk-files. Now my Android has moved on and updated the NDK package and many other details.

Here my output, maybe you see something else that I have overlooked. Thank you and greetings.
Martin

*** DICTIONARY APP BUILDER ***
*** 3.1 ***

*** Building Android app ***

App Project:  Anii Chabi
App Name:     Cab?
App Version:  1.0
Package:      org.sil.blo.dicco
Apk Filename: Anii_Chabi-1.0.apk

Grandroid:    Yes
Analytics:    No
Expiry:       No
App Builder:  C:\Program Files (x86)\SIL\Dictionary App Builder

*** Setting paths ***

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172
ANDROID_HOME=C:\Users\martin\AppData\Local\Android\sdk
GRADLE_HOME=C:\Program Files (x86)\SIL\Dictionary App Builder\tools\gradle
MAVEN_HOME=C:\Program Files (x86)\SIL\Dictionary App Builder\tools\maven

Path=C:\Program Files (x86)\SIL\Dictionary App Builder\tools\maven\bin;C:\Program Files (x86)\SIL\Dictionary App Builder                                      \tools\gradle\bin;C:\Users\martin\AppData\Local\Android\sdk\tools;C:\Program Files\Java\jdk1.8.0_172\bin;C:\Program File                                      s\Python37\Scripts\;C:\Program Files\Python37\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files                                       (x86)\SIL\FieldWorks 8\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\SIL;C:\Windows\System32                                      \QtForCordial;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDO                                      WS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\IsoBuster;C:\Program File                                      s (x86)\GNU\GnuPG\pub;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) M                                      anagement Engine Components\IPT;C:\Program Files\Calibre2\;C:\Program Files (x86)\Kensington\TrackballWorks;C:\Program F                                      iles (x86)\Skype\Phone\;C:\Program Files\Git\cmd;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\Wi                                      relessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Users\martin\AppData\Local\Microsoft\WindowsApps;C                                      :\Users\martin\AppData\Local\GitHubDesktop\bin;C:\Users\martin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Inte                                      l\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\martin\1\44\texlive\2018\bin\win32
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW

*** JDK ***

java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

*** Android SDK ***

Target Android Platform:    Android 8.0 Oreo (API 26)
Minimum Android Platform:   Android 4.4 KitKat (API 19)
SDK Tools Version:          26.1.1
SDK Build Tools Version:    28.0.3
SDK Platform Tools Version: 28.0.1

*** Compiling apk ***

C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a>call gradle clean assembleRelease
:clean
:preBuild UP-TO-DATE
:extractProguardFiles
:preReleaseBuild
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2540Library
:prepareComAndroidSupportAppcompatV72540Library
:prepareComAndroidSupportDesign2540Library
:prepareComAndroidSupportPreferenceV72540Library
:prepareComAndroidSupportRecyclerviewV72540Library
:prepareComAndroidSupportSupportCompat2540Library
:prepareComAndroidSupportSupportCoreUi2540Library
:prepareComAndroidSupportSupportCoreUtils2540Library
:prepareComAndroidSupportSupportFragment2540Library
:prepareComAndroidSupportSupportMediaCompat2540Library
:prepareComAndroidSupportSupportV42540Library
:prepareComAndroidSupportSupportVectorDrawable2540Library
:prepareComAndroidSupportTransition2540Library
:prepareNetXpeceAndroidSupportPreference127Library
:prepareNetXpeceAndroidSupportSpinner127Library
:prepareOrgSilAppAndroidAppAndroidCommon10Library
:prepareOrgSilAppAndroidAppAndroidDictionary10Library
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:javaPreCompileRelease
:compileReleaseJavaWithJavac
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:compileReleaseNdk NO-SOURCE
:compileReleaseSources
:lintVitalRelease
:mergeReleaseShaders
:compileReleaseShaders
:generateReleaseAssets
:mergeReleaseAssets
:processReleaseJavaRes NO-SOURCE
:transformResourcesWithMergeJavaResForRelease
:transformClassesAndResourcesWithProguardForRelease
ProGuard, version 5.3.2
Reading input...
Reading program jar [C:\Users\martin\.android\build-cache\944d9931dd09d272f47af1024baf442ff191aafb\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\eea840c42176f20e1b4c1062627e3240f9bb1199\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\a1bffc85ee75a463aa05557b0cd8efdb49107d49\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\2d243009ce4985bd32ad627e42d79d9b4b207cd4\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\48e2c58b1dddc6059e183088bf86d89c3961302d\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\e5f08481d884dc25cbdef1a423941681eb60a5fc\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\5dc14b814272cf093a1cd00275a77756b23610e7\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\39b24750aac3e794e26aece867e2b21a877e76c5\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\55b760b1489e9662d3573bf594abc219a8e4fe44\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\26950ff745e2af34f13caba2364e0c14b76bb189\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\26e941d19a9b2a6d6bd920daa041d2bd7e805eb4\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\d4ab2c41251f47ad09f78bb7940cae14e4631375\output\jars\classes.jar] (filtered)
Reading program jar [C:\Program Files (x86)\SIL\Dictionary App Builder\lib\app-lib-common.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\5b0df8f1f15bd29b748ae1a125baff2c600d467c\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\a28debaff33919f8a773db224fd34b9f0bbfe0c5\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\4ed6f02e5f29ae8cb3f046eab8064ed1254494d2\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.gradle\caches\modules-2\files-2.1\com.android.support\support-annotations\25.4.0\f6a2fc748ae3769633dea050563e1613e93c135e\support-annotations-25.4.0.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\00be18bfb2a5eb71e73e3e9656d6621538c5cd0b\output\jars\classes.jar] (filtered)
Reading program jar [C:\Users\martin\.android\build-cache\b5e4c8e4d9950cf1de5ab33d6aceb0f87dd8b833\output\jars\classes.jar] (filtered)
Reading program jar [C:\Program Files (x86)\SIL\Dictionary App Builder\lib\app-lib-dictionary.jar] (filtered)
Reading program jar [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\intermediates\transforms\mergeJavaRes\release\jars\2\1f\main.jar] (filtered)
Reading program directory [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\intermediates\classes\release] (filtered)
Reading library jar [C:\Users\martin\AppData\Local\Android\sdk\platforms\android-26\android.jar]
Reading library jar [C:\Users\martin\AppData\Local\Android\sdk\platforms\android-26\optional\org.apache.http.legacy.jar]
Note: duplicate definition of library class [org.apache.http.params.HttpConnectionParams]
Note: duplicate definition of library class [org.apache.http.params.HttpParams]
Note: duplicate definition of library class [org.apache.http.params.CoreConnectionPNames]
Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
Note: duplicate definition of library class [org.apache.http.conn.scheme.LayeredSocketFactory]
Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
Note: duplicate definition of library class [android.net.http.SslCertificate]
Note: duplicate definition of library class [android.net.http.HttpResponseCache]
Note: duplicate definition of library class [android.net.http.SslError]
Note: there were 11 duplicate class definitions.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Initializing...
Ignoring unused library classes...
  Original number of library classes: 4590
  Final number of library classes:    1170
Printing kept classes, fields, and methods...
Shrinking...
Printing usage to [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\outputs\mapping\release\usage.txt]...
Removing unused program classes and class elements...
  Original number of program classes: 2896
  Final number of program classes:    1521
Obfuscating...
Printing mapping to [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\outputs\mapping\release\mapping.txt]...
Writing output...
Preparing output jar [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\intermediates\transforms\proguard\release\jars\3\1f\main.jar]
  Copying resources from program jar [C:\Users\martin\.android\build-cache\944d9931dd09d272f47af1024baf442ff191aafb\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\eea840c42176f20e1b4c1062627e3240f9bb1199\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\a1bffc85ee75a463aa05557b0cd8efdb49107d49\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\2d243009ce4985bd32ad627e42d79d9b4b207cd4\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\48e2c58b1dddc6059e183088bf86d89c3961302d\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\e5f08481d884dc25cbdef1a423941681eb60a5fc\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\5dc14b814272cf093a1cd00275a77756b23610e7\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\39b24750aac3e794e26aece867e2b21a877e76c5\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\55b760b1489e9662d3573bf594abc219a8e4fe44\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\26950ff745e2af34f13caba2364e0c14b76bb189\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\26e941d19a9b2a6d6bd920daa041d2bd7e805eb4\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\d4ab2c41251f47ad09f78bb7940cae14e4631375\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Program Files (x86)\SIL\Dictionary App Builder\lib\app-lib-common.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\5b0df8f1f15bd29b748ae1a125baff2c600d467c\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\a28debaff33919f8a773db224fd34b9f0bbfe0c5\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\4ed6f02e5f29ae8cb3f046eab8064ed1254494d2\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.gradle\caches\modules-2\files-2.1\com.android.support\support-annotations\25.4.0\f6a2fc748ae3769633dea050563e1613e93c135e\support-annotations-25.4.0.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\00be18bfb2a5eb71e73e3e9656d6621538c5cd0b\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\.android\build-cache\b5e4c8e4d9950cf1de5ab33d6aceb0f87dd8b833\output\jars\classes.jar] (filtered)
  Copying resources from program jar [C:\Program Files (x86)\SIL\Dictionary App Builder\lib\app-lib-dictionary.jar] (filtered)
  Copying resources from program jar [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\intermediates\transforms\mergeJavaRes\release\jars\2\1f\main.jar] (filtered)
  Copying resources from program directory [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\intermediates\classes\release] (filtered)
Printing classes to [C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\outputs\mapping\release\dump.txt]...
:transformClassesWithDexForRelease
:mergeReleaseJniLibFolders
:transformNativeLibsWithMergeJniLibsForRelease
:transformNativeLibsWithStripDebugSymbolForRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformNativeLibsWithStripDebugSymbolForRelease'.
> A problem occurred starting process 'command 'C:\Users\martin\AppData\Local\Android\sdk\ndk-bundle\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 20.355 secs
 Datenträger in Laufwerk C: ist WindowsC
 Volumeseriennummer: 6A64-8A93

 Verzeichnis von C:\Users\martin\1\anii\2018_Cabi_App\Dictionary Apps\Temp\App Builder\build\DAB.001\a\build\outputs

Datei nicht gefunden

BUILD FAILED:
The signed apk was not built successfully. This could be due to an internet connection problem. On the first build, the compiler needs to connect to the internet to download some library files.

I would add that I did (and do) have a working internet connection. I had experimented with updates for the gradle which comes with DAB and could see plenty internet activity. Sadly that hack did not work, so I went back to the default gradle and my errors look like before.

I can report that the hack from Stackoverflow works for me:

Go to https://developer.android.com/ndk/downloads/older_releases and pull Version 16b of the NDK which fits (I pulled 64bit Windows). Then unzip and copy the missing folder to where your SDK is keeping your NDK. In my case I copied mips64el-linux-android-4.9 and put it into “C:\Users\myname\AppData\Local\Android\sdk\ndk-bundle\toolchains” where my Android Studio keeps it.

Now I get a working app again. While waiting for good new things to come in January.

Yesterday I did a fresh install of DAB, JDK, SDK and I made an extra effort to keep everything completely separate from my Android Studio.

I wrote another post with much rambling, but since my fresh installation is now working nicely - and I did not need to uninstall my huge Android Studio - we can now consider this thread closed.

Anybody runs into this issue: Do a fresh install of DAB and just make extra folders for your SDK and use the old version 8 JDK just for DAB. If your internet is also slow and expensive, you will hesitate like I did, but it works. hth