Error gradle when run
yafianshori opened this issue · 6 comments
yafianshori commented
* Error running Gradle:
ProcessException: Process "D:\Projek\mobile\template\flutter_ui_challenges\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Projek\mobile\template\flutter_ui_challenges\android\app\build.gradle' line: 52
* What went wrong:
A problem occurred evaluating project ':app'.
> path may not be null or empty string. path='null'
* 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 24s
Command: D:\Projek\mobile\template\flutter_ui_challenges\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.
lohanidamodar commented
please provide more information
-> output of flutter doctor
-> run with --stacktrace and post the details
ArunKarthick72 commented
D:\Flutter Tutorials\31_May\flutter_ui_challenges-master>flutter run
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software
rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 3.1s
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "D:\Flutter Tutorials\31_May\flutter_ui_challenges-master\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Flutter Tutorials\31_May\flutter_ui_challenges-master\android\app\build.gradle' line: 52
* What went wrong:
A problem occurred evaluating project ':app'.
> path may not be null or empty string. path='null'
* 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
Command: D:\Flutter Tutorials\31_May\flutter_ui_challenges-master\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder.
ArunKarthick72 commented
D:\Flutter Tutorials\31_May\flutter_ui_challenges-master>flutter doctor
Waiting for another flutter command to release the startup lock...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 6.1.7601], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] Connected device (1 available)
• No issues found!
ArunKarthick72 commented
D:\Flutter Tutorials\31_May\flutter_ui_challenges-master>flutter doctor -v
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 6.1.7601], locale en-US)
• Flutter version 1.2.1 at D:\flutter
• Framework revision 8661d8aecd (4 months ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\Saitech\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.3)
• Android Studio at D:\Program Files\Android\Android Studio
• Flutter plugin version 33.3.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
lohanidamodar commented
Well, the problem is with signing keys that I have used for releasing my app in playstore. To run do the following
- Open android/app/build.gradle
- comment out codes from line 27 - 31 and 48-55
- change line 58 to
signingConfig signingConfigs.debug
This should, solve the problem. If the problem still exist feel free to contact.
Thank you
jaasaria commented
can you please enter na codes to be commented? i dont think that your build.gradle is same with me.
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.money"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}