[Android-tools-devel] Serious bugs and errors in android tools and gradle build process on Debian 10 Buster.
Alexander
remake347 at gmail.com
Wed Aug 14 10:12:56 BST 2019
Hello from Russia.
I have Debian 10 Buster. I beginner in android developement. Early I'd
success build firs android program in Eclipse (in Etch etc..). Now I
try to build F-Droid application from Git in command line and not have
success. All what I done is fron wiki source
https://wiki.debian.org/AndroidTools/IntroBuildingApps
and
https://wiki.debian.org/AndroidTools
It's all steps 've been 100% done! But.. nothing. I've tired.
What I've done:
1) Install Debian 10 Buster (stable) using minimum ISO with net
installation.
2) apt install android-sdk android-sdk-platform-23
3) export ANDROID_HOME=/usr/lib/android-sdk
4) apt install libgradle-android-plugin-java (from SID)
5) apt install android-sdk-helper (from SID)
note: Repositories SIDs added with Synaptic package manager because
libgradle-android-plugin-java and android-sdk-helper not exist in
Buster stable repositories.
6) In build.gradle, change compileSdkVersion to 23 and
buildToolsVersion to 24.0.0 (I've tried use '27.0.1' too).
7) All steps from
https://wiki.debian.org/AndroidTools/IntroBuildingApps was done
completely.
8) Get F-droid source code from git.
9) Accepting SDK license (note: using android-sdk from Debian 10
Buster).
10) Try to build F-droid source code by command "~/Git/fdroidclient$
gradle build
--init-script /usr/share/android-sdk-helper/init.gradle~/Git/fdroidclient$
gradle build --init-script /usr/share/android-sdk-helper/init.gradle"
I HAVE MANY ERRORS.
1. First try to build:
.......... CUT
> Configure project :app
buildTypes.debug defaultConfig.versionCode 1007050
Project evaluation failed including an error in afterEvaluate {}. Run
with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/alexander/Git/fdroidclient/app/build.gradle' line: 91
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not set unknown property 'includeAndroidResources' for object
> of type
> com.android.build.gradle.internal.dsl.TestOptions$UnitTestOptions.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output. Run with --scan to get full
insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
.......... CUT
..........
That error I've try to delete by
editing /home/alexander/Git/fdroidclient/app/build.gradle
That code I used:
testOptions {
unitTests.all {
includeAndroidResources = true
jacoco {
includeNoLocationClasses = true
}
forkEvery = 40
maxHeapSize = "2g"
}
}
Now error was fixed. But have another errors!
2. Gradle crying about not existing method 'IMPLEMENTATION ()'
I've try to change words
in /home/alexander/Git/fdroidclient/app/build.gradle from
"IMPLEMENTATION" on "COMPILE". And now it works.
That's is:
dependencies {
compile 'com.android.support:support-v4:27.1.1'
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:gridlayout-v7:27.1.1'
compile 'com.android.support:support-annotations:27.1.1'
compile 'com.android.support:recyclerview-v7:27.1.1'
compile 'com.android.support:cardview-v7:27.1.1'
..................
..............CUT
3. Now gradle crying about "No Build-tools available"! *UCK!!!
That's is:
at
org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.base/java.lang.Thread.run(Thread.java:834)
> Configure project :app
buildTypes.debug defaultConfig.versionCode 1007050
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> No Build-tools available.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output. Run with --scan to get full
insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 36s
..................CUT
and I don't know how to fix it!
Can you help me to build first android application in Debian 10 Buster
on example F-Droid source from git?
I have a backup F-Droid source in another directory. So I can start
build process from zero.
More information about the Android-tools-devel
mailing list