A problem occurred evaluating project ':app'. (flutter) - android

im trying to clone project, im fixing the android embedding problem, etc. and im facing this problem.
`FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\muham\OneDrive\Documents\KP\sipintar-enterprise-mobile-dev_upgrade\sipintar-enterprise-mobile-dev_upgrade\sipintar-enterprise-mobile-dev_upgrade\android\app\build.gradle' line: 25
What went wrong:
A problem occurred evaluating project ':app'.
org/gradle/api/services/BuildService
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 4s
Exception: Gradle task assembleDebug failed with exit code 1`
this is build.gradle line 25
apply plugin: 'kotlin-android'
pls help me im new at this

Related

Flutter project compiler failed in build.gradle line: apply plugin: 'com.android.application'

FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\Asus\Desktop\Yeni klas�r\b\android\app\build.gradle' line: 24
What went wrong:
A problem occurred evaluating project ':app'.
Failed to apply plugin 'com.android.internal.application'.
Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.
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
BU�LD FAILED in 4s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I try to:
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.

Flutter build.gradle Error. I tried to build my Flutter app but i has some problem

FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\mohmed\Desktop\Ultimate Pos\upos\android\build.gradle' line: 26
What went wrong:
A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Could not open proj generic class cache for build file 'C:\Users\mohmed\Desktop\Ultimate Pos\upos\android\app\build.gradle' (C:\Users\mohmed.gradle\caches\7.4\scripts\79zlnvg89ejgolmm666ahsurd).
> BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63
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 10s
Running Gradle task 'assembleDebug'... ٢١٫٧s
Exception: Gradle task assembleDebug failed with exit code 1
I think I have some problems with my 'android\build.gradle

failed to apply kotlin-android and compileSdkVersion is not specified

native and am having trouble building my android version which is giving me the error bellow and i couldnt find anything about it with the newer versions of react-native-webview
ty in advance
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'D:\Users\Volxen\Desktop\port\tv\node_modules\react-native-webview\android\build.gradle' line: 35
* What went wrong:
A problem occurred evaluating project ':react-native-webview'.
> Failed to apply plugin 'kotlin-android'.
> Malformed \uxxxx encoding.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-webview'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

Unable to run Flutter Project with Package

I created a new app.
Added audioplayers flutter package from https://pub.dev/packages/audioplayers.
Shows an error from Android Embedding. I followed the instructions https://flutter.dev/go/android-project-migration.
Now I get this error:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\audioplayers-0.17.1\android\build.gradle' line: 23
* What went wrong:
A problem occurred evaluating project ':audioplayers'.
> Plugin with id 'kotlin-android' not found.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':audioplayers'.
> compileSdkVersion is not specified.
* 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
Exception: Gradle task assembleDebug failed with exit code 1
Then I followed https://github.com/react-native-webview/react-native-webview/issues/1407 thread to do what suggested.
Now I'm getting this error:
FAILURE: Build failed with an exception.
Where:
Build file 'C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\audioplayers-0.17.1\android\build.gradle' line: 49
What went wrong:
A problem occurred evaluating project ':audioplayers'.
Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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 4s
Exception: Gradle task assembleDebug failed with exit code 1
I'm very new in android studio development, it drives me crazy with these configurations. Thank you very much.
For those who came up with the same problem I have. The project I'm working came from Git and I think that project wasn't updated for Android Embedding v2 so I got the first error.
Now in the second error, all I did was to read other's bug fixes (not officially).
Adding the dependencies and kotlin-version (1.4.20) needed for the main package(audioplayers). C:\flutter\flutter.pub-cache\hosted\pub.dartlang.org\audioplayers-0.17.1\android\
Making the android project's app build.gradle>defaultConfig>minSdkVersion to 23 (from 16)
Use pub get and update in pubspec.yaml.

Kotlin basic program is not working in android studio

I have recently installed Android studio 4.1.1. I am getting below error while executing "Hello world" kotlin program in android studio. kindly help me..
Where:
Initialization script 'C:\Users\pcadmin\AppData\Local\Temp\KotlinBasicsKt_main__.gradle' line: 27
What went wrong:
A problem occurred configuring project ':app'.
Could not create task ':app:KotlinBasicsKt.main()'.
SourceSet with name 'main' not found.
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 34s
16:25:40: Task execution finished 'KotlinBasicsKt.main()'.

Categories

Resources