When I run the application without adding image picker as a dependency, it works fine. But when I add the plugin and run, it is giving me gradle build failed error.
Resolving dependencies... 5.0s
Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
D8: Program type already present: android.support.v4.app.INotificationSideChannel
*********************************************************
WARNING: This version of image_picker will break your Android build if it or its dependencies aren't compatible with AndroidX.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\142.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\118.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\94.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\124.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\88.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\136.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\157.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\103.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\163.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\151.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\127.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\100.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\166.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\139.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\97.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\115.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\160.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\169.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\106.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\154.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\148.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\112.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\172.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\133.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\109.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\91.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\121.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\130.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\145.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\27.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\52.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\18.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\43.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\19.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\51.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\60.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\36.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\34.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\42.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\28.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\50.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\33.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\37.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\2.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\9.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\25.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\45.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\32.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\38.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\39.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\44.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\57.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\26.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\8.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\31.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\30.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\56.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\13.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\14.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\21.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\49.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\7.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\12.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\15.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\55.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\58.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\6.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\20.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\46.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\11.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\59.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\24.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\29.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\54.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\16.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\41.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\5.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\10.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\3.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\17.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\23.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\47.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\40.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\53.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\35.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\4.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\48.jar, D:\fluuter_projects\motor_app_demo\build\app\intermediates\transforms\dexBuilder\debug\22.jar
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel
* 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 22s
Gradle task 'assembleDebug'... Done 23.7s
Gradle task assembleDebug failed with exit code 1
Due to Android X Support...
Simple Solution Avoiding AndroidX and rollback to older version
dependencies:
image_picker: 0.4.12+1
or
Migrate Flutter app to AndroidX
Import your Flutter app into Android Studio so that the IDE can parse the Android code following the steps in Editing Android code in Android Studio with full IDE support.
Follow the instructions for Migrating to AndroidX.
https://flutter.io/docs/development/packages-and-plugins/androidx-compatibility
https://developer.android.com/jetpack/androidx/migrate
Related
I am facing error in flutter when I use firebase. The app is not building. This is the error which I am facing:-
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
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 help gradle
BUILD FAILED in 1m 44s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 108.0s
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 firebase_core...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 11.2s
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project firebase_core.
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 help gradle
BUILD FAILED in 9s
The plugin firebase_core could not be built due to the issue above.
Here is my code in pubspec.yaml file:
cupertino_icons: ^0.1.2
firebase_database: ^1.0.5
firebase_core: 0.3.0
firebase_storage: 2.0.0
image_picker: ^0.6.0+1
url_launcher: ^4.1.0+1
I get this error when i add "cloud_firestore:" to pubspec.yaml :
$ flutter run
Launching lib/main.dart on Infinix X627 in debug mode...
Initializing gradle... 1.6s
Resolving dependencies... 5.4s
Note: /home/muhammad/development/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/muhammad/development/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Cannot fit requested classes in a single dex file (# methods: 80689 > 65536)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/0.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/1.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/4.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/5.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/6.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/7.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/8.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/9.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/10.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/11.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/12.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/13.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/14.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/15.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/16.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/17.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/18.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/19.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/20.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/21.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/22.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/23.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/24.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/25.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/26.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/27.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/28.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/29.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/30.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/31.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/32.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/33.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/34.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/35.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/36.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/37.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/38.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/39.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/40.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/41.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/42.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/43.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/44.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/45.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/46.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/47.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/48.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/49.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/50.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/51.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/52.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/53.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/54.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/55.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/56.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/57.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/58.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/59.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/60.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/62.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/63.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/64.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/65.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/66.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/67.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/68.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/69.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/72.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/73.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/74.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/75.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/76.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/77.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/78.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/79.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/80.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/81.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/82.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/83.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/84.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/85.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/86.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/87.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/88.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/89.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/90.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/91.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/92.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/93.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/94.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/95.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/96.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/97.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/98.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/99.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/100.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/101.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/102.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/103.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/104.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/105.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/107.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/108.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/109.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/110.jar, /home/muhammad/Documents/lab/flutter/teststore/build/app/intermediates/transforms/dexBuilder/debug/111.jar
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
* 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 1m 36s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 96.8s
Gradle task assembleDebug failed with exit code 1
(I'm new to flutter and android development)
Since cloud_firestore is a decently sized dependency, you need to enable multidex.
View this to configure your app to support multidex.
If you don't want to do that, all you have to do is set your minSdkVersion to 21 or higher in your build.gradle. However, that does make it so that your app doesn't support devices below 5.1.
Depending on how many users you want to support, I'd recommend just upgrading your minSdkVersion since it's the easiest way. It's up to you however.
I'm trying to use this dependency but get an error when I run:
flutter packages get
after adding the dependency
dependencies:
flutter:
sdk: flutter
flutter_oauth: "^0.0.1"
The error:
The current Dart SDK version is 2.3.0-dev.0.5.flutter-a1668566e5.
Because flutter_app depends on flutter_oauth any which requires SDK version >=1.8.0 <2.0.0, version solving failed.
pub get failed (1)
exit code 1
I have a feeling I need to change some environment settings but I'm not too sure how to do that:
environment:
sdk: ">=2.1.0 <3.0.0"
Update: I used the new dependency as suggested: flutter_generic_oauth: ^1.0.2 and received this error when i ran the app on android studio's simulator:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.3.5\android\src\main\java\com\flutter_webview_plugin\WebviewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Program type already present: android.support.v4.app.INotificationSideChannel
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\6.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\7.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\8.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\9.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\10.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\11.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\12.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\13.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\14.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\15.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\16.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\17.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\18.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\19.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\20.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\21.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\22.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\23.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\24.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\25.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\26.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\27.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\28.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\29.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\30.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\31.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\32.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\33.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\34.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\35.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\36.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\37.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\38.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\39.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\40.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\41.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\42.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\43.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\44.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\45.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\46.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\47.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\48.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\49.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\50.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\51.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\52.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\53.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\54.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\55.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\56.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\57.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\58.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\59.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\60.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\61.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\62.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\63.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\64.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\65.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\66.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\68.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\69.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\70.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\72.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\73.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\74.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\75.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\76.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\77.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\78.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\79.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\80.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\81.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\82.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\83.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\84.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\85.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\86.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\87.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\88.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\89.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\90.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\91.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\92.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\93.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\94.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\95.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\96.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\97.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\98.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\99.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\100.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\101.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\102.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\103.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\104.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\105.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\106.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\107.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\108.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\109.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\110.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\111.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\112.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\113.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\114.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\115.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\116.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\117.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\118.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\119.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\120.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\121.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\122.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\123.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\124.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\125.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\126.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\127.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\128.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\129.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\130.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\131.jar, D:\garuda-academy\garuda_academy_app\build\app\intermediates\transforms\dexBuilder\debug\132.jar
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel
* 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 17s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1
That package hasn't been updated to Dart 2.0. Use flutter_generic_oauth instead.
You will need to convert your project to AndroidX.
I am developing a flutter app.
I found a sample flutter project so folk it.
But the project... build failed with below log message.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) 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 0s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1
The project is not special.
The android part, there are no other modifications.
It is totally same with the "new flutter project'.
I tried something:
Migration to AndroidX
This is failed with error popup. I tried to migration using "refactor > migration to android x", but it shows error popup.
The error popup said to me use compilesdkversion at least 28.
But I already use 28.. what should I do?......
change gradle version from 3.2.1 to 3.3.2.
But build failed with different log
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Program type already present: android.support.v4.app.INotificationSideChannel
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel
I don't know what should i do...
It make me to tired...
I just want to coding...
I resolve this issue following this link: https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
There is 2 migration guide.
Recommended
Not Recommended
In my case, 'Recommended' solution doesn't work...
But, 'Not recommended' solution works...
...
It's not easy...
I tried this two lines of code
flutter clean and then
flutter run
I am fairly new to VSTS and the whole Microsoft Online Services Platform.
I am facing a problem when trying to initialise a build on our VSTS repository. I have selected the default Android build setting from the drop down menu, but it does not work. Every time I try to build, I reach the gradlew build stage and I get the error: Error: D:\a\1\s\gradlew.bat failed with return code: 1
I can build the code using the android Studio IDE, but I now need to use VSTS.
`
Any help would be much appreciated. Thank you!
EDIT: Here is the full log of the build
2018-07-28T19:23:31.6824618Z ##[section]Starting: gradlew build
2018-07-28T19:23:31.6830050Z ==============================================================================
2018-07-28T19:23:31.6830213Z Task : Gradle
2018-07-28T19:23:31.6830359Z Description : Build using a Gradle wrapper script
2018-07-28T19:23:31.6830487Z Version : 2.137.1
2018-07-28T19:23:31.6830608Z Author : Microsoft Corporation
2018-07-28T19:23:31.6830766Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613720)
2018-07-28T19:23:31.6830930Z ==============================================================================
2018-07-28T19:23:33.2899535Z SonarQube analysis is enabled.
2018-07-28T19:23:33.2900156Z Checkstyle analysis is enabled.
2018-07-28T19:23:33.2900406Z FindBugs analysis is enabled.
2018-07-28T19:23:33.2900654Z PMD analysis is enabled.
2018-07-28T19:23:33.2900905Z SYSTEMVSSCONNECTION exists true
2018-07-28T19:23:33.2901941Z [command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\1\s\gradlew.bat build sonarqube -I D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.137.1\node_modules\codeanalysis-common\checkstyle.gradle -I D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.137.1\node_modules\codeanalysis-common\findbugs.gradle -I D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.137.1\node_modules\codeanalysis-common\pmd.gradle"
2018-07-28T19:24:05.3436260Z Downloading https://services.gradle.org/distributions/gradle-4.6-all.zip
2018-07-28T19:24:29.2233239Z Unzipping C:\Users\VssAdministrator\.gradle\wrapper\dists\gradle-4.6-all\bcst21l2brirad8k2ben1letg\gradle-4.6-all.zip to C:\Users\VssAdministrator\.gradle\wrapper\dists\gradle-4.6-all\bcst21l2brirad8k2ben1letg
2018-07-28T19:25:41.8632779Z Starting a Gradle Daemon (subsequent builds will be faster)
{A series of downloads for the packages we use, omitted for character limit's sake}
2018-07-28T19:26:20.6092629Z Applying the Checkstyle plugin to project s
2018-07-28T19:26:20.6792218Z Applying the FindBugs plugin to project s
2018-07-28T19:26:20.6792841Z Applying the PMD plugin to all projects
2018-07-28T19:26:23.9485033Z Applying the Checkstyle plugin to project volve
2018-07-28T19:26:23.9621010Z Applying the FindBugs plugin to project volve
2018-07-28T19:26:23.9621425Z Applying the PMD plugin to all projects
2018-07-28T19:26:28.6406403Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6407012Z support library package not found: android.support.constraint.motion.
2018-07-28T19:26:28.6407656Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6407994Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6408285Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6408525Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6408784Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6409785Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6410031Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6410325Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6410567Z support library package not found: android.support.constraint.
2018-07-28T19:26:28.6410830Z support library package not found: android.support.constraint.
2018-07-28T19:26:39.5509667Z Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
2018-07-28T19:26:39.6403284Z registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
2018-07-28T19:26:39.7610924Z registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
2018-07-28T19:26:39.7830309Z Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
2018-07-28T19:26:39.7922748Z registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
2018-07-28T19:26:39.8933520Z registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
2018-07-28T19:26:39.9253837Z
2018-07-28T19:26:39.9254479Z FAILURE: Build failed with an exception.
2018-07-28T19:26:39.9254716Z
2018-07-28T19:26:39.9254905Z * What went wrong:
2018-07-28T19:26:39.9255123Z Task 'sonarqube' not found in root project 's'.
2018-07-28T19:26:39.9255269Z
2018-07-28T19:26:39.9255429Z * Try:
2018-07-28T19:26:39.9255675Z Run gradlew tasks to get a list of available tasks. 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.
2018-07-28T19:26:39.9255897Z
2018-07-28T19:26:39.9256078Z * Get more help at https://help.gradle.org
2018-07-28T19:26:39.9256222Z
2018-07-28T19:26:39.9256413Z BUILD FAILED in 2m 49s
2018-07-28T19:26:40.5195018Z Error: D:\a\1\s\gradlew.bat failed with return code: 1
2018-07-28T19:26:40.5195970Z at ChildProcess.<anonymous> (D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.137.1\node_modules\vsts-task-lib\toolrunner.js:569:30)
2018-07-28T19:26:40.5196934Z at emitTwo (events.js:106:13)
2018-07-28T19:26:40.5197445Z at ChildProcess.emit (events.js:191:7)
2018-07-28T19:26:40.5198292Z at maybeClose (internal/child_process.js:886:16)
2018-07-28T19:26:40.5198771Z at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
2018-07-28T19:26:40.6483964Z ##[warning]No test result files matching D:\a\1\s\**\TEST-*.xml were found, so publishing JUnit test results is being skipped.
2018-07-28T19:26:40.6494902Z ##[error]Error: D:\a\1\s\gradlew.bat failed with return code: 1
2018-07-28T19:26:40.6541754Z ##[section]Finishing: gradlew build
You can use Android build template to build your android project in VSTS.
Detail configuration for Gradle task as below:
Gradle wrapper: relative path to gradlew file
Working directory: same directory where gradlew file exist. It use $(Build.SourcesDirectory) directory by default.
Tasks: build
Such as if the android project with the file structure as intro_android_demo (gradlew file in the root directory of the repo), then the Gradle task configuration should as below: