Open dekdoijaidee opened 4 years ago
You have to degrade your Kotlin Gradle Version : 1.3.0, because flutter_rtmp_publisher using gradle version of 1.3.0.
Howdy! forgive me but I must be missing something because just changing build.gradle ext.kotlin_version = '1.3.50' to "1.3.0" doesn't fix the issue. Can you please be more specific on how to downgrade property. Thanks.
I tried a flutter clean but still got the same error
resolved, changing minSdkVersion 16 to 21 and copying this packages Buildscript worked.
@Vercjames , I too have the same issue. I have changed minSdkVersion 16 to 21. Still, I am getting the error. Could you detail copying these packages build scripts mean?
Hit me up with the error message you are getting. Additionally after changing the 16 to 21 and then downgrading the Grable Version, I ran a Flutter Clean
.
android/build.gradle
buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Thanks @Vercjames its resolved
@Vercjames my issue is not getting resolved by doing these three things
Hit me up with the error message you are getting. Additionally after changing the 16 to 21 and then downgrading the Grable Version, I ran a
Flutter Clean
.android/build.gradle
buildscript { ext.kotlin_version = '1.3.0' repositories { google() jcenter() maven { url 'https://jitpack.io' } } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() jcenter() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir }
Could u explain me in some detail?
Can you provide me some context kind sir. an error message perhaps. I assume you are trying to set this all up in a new flutter project. Also I used windows to compile my application, if you are MacOS something may be different with the pod installation.
@Vercjames Yes I'm trying this all in a new flutter project and working on windows. The error message is same: FAILURE: Build failed with an exception.
I have set minsdk in app build.gradle to 21 and done flutter clean as well. If u could help me with how to downgrade the gradle version that will suffice I think.
Peculiar - since the provided script should have downgraded gradle for you. but rather than leaving you hanging I made a video to hopefully put this thread to bed. hopefully this solves the issue.
@Vercjames Thank you for the video but now there are more issues arising. Actually I'm also using the camera plugin which I think is giving error.
**FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:preDebugBuild'.
Android dependency 'androidx.lifecycle:lifecycle-runtime' has different version for the compile (2.0.0-rc01) and runtime (2.0.0) classpath. You should manually set the same version via DependencyResolution
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 32s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 33.6s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the
incompatibility.
Building plugin camera...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 4.4s
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'camera'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
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 3s
The plugin camera could not be built due to the issue above.**
Hit me up with the error message you are getting. Additionally after changing the 16 to 21 and then downgrading the Grable Version, I ran a
Flutter Clean
.android/build.gradle
buildscript { ext.kotlin_version = '1.3.0' repositories { google() jcenter() maven { url 'https://jitpack.io' } } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() jcenter() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir }
after downgrading this the error I'm having
FAILURE: Build failed with an exception.
Where: Build file '/Users/user/StudioProjects/startv/android/app/build.gradle' line: 25
What went wrong: A problem occurred evaluating project ':app'.
java.lang.ExceptionInInitializerError (no error message)
Hi
I use your lib and found error when build my app
What should I do?
Thank you