JetBrains / kotlinconf-app

KotlinConf Schedule Application
Apache License 2.0
2.97k stars 312 forks source link

Project build issues #59

Open tekinalper opened 5 years ago

tekinalper commented 5 years ago

When I build the project as is with the master branch, I get the following error as expected:

  • What went wrong: A problem occurred evaluating project ':android:app'. Failed to apply plugin [id 'com.android.application'] Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6.

Then I change gradle_android_version to 3.2.0 with gradle-4.7 and getting more errors like:

This declaration is experimental and its usage should be marked with '@io.ktor.util.KtorExperimentalAPI' or '@UseExperimental(io.ktor.util.KtorExperimentalAPI::class)'

As far as I understand, we also can not upgrade the gradle version above gradle-4.7 because of Ktor. I do try to use 4.10.2

Anyone has a successful build?

BenDLH commented 5 years ago

Make sure org.gradle.configureondemand=true isn't in your user level gradle.properties file. Mine had it, and removing it fixed that issue for me. You shouldn't need to change the Gradle versions.

I've built the project successfully.

langsmith commented 5 years ago

Adding org.gradle.configureondemand=false to my gradle.properties file is what fixed the OP issue for me.

wuseal commented 5 years ago

The same issue here


* Where:
Build file '/Users/wuhaibao/IdeaProjects/kotlinconf-app/android/app/build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':android:app'.
> Failed to apply plugin [id 'com.android.application']
   > Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6.

* 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
11:45:15: Task execution finished 'build'.

My user level gradle.properties is :

## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Thu Apr 05 12:46:45 CST 2018
systemProp.https.nonProxyHosts=127.*,192.*
systemProp.https.proxyPort=1087
systemProp.http.proxyHost=127.0.0.1
systemProp.http.nonProxyHosts=127.*,192.*
systemProp.https.proxyHost=127.0.0.1
systemProp.http.proxyPort=1087

org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home

And my project gradle.properties is :

# gradle
org.gradle.jvmargs=-Xmx1536m
org.gradle.parallel=true

# kotlin
kotlin_version=1.3.11
kotlin.incremental.multiplatform = true

# kotlin libraries
coroutines_version=1.1.0
ktor_version=1.1.1
serialization_version=0.9.1

# android
INCLUDE_ANDROID=true
gradle_android_version=3.1.3
anko_version=0.10.5

# backend
squash_version=0.2.3

gradle-wrapper properties:

#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip

I Just clone it and run build task in the gradle panel image

image image

Anything wrong or any thing I missed? need help! 😢