You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { stream ->
localProperties.load(stream)
}
}
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.")
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
buildToolsVersion '25.0.3'
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.niyazibank.niyazibank"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
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 {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
}
ERROR:
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
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:processDebugGoogleServices'.
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.
It uses com.google.android.gms:play-services-maps:11.+ -> 11.8.0 which depends on com.google.android.gms:play-services-base:11.8.0 and com.google.android.gms:play-services-basement:11.8.0, the versions are matched and map_view works properly.
Use map_view with firebase_messaging by adding classpath 'com.google.gms:google-services:3.2.1' in android/build.gradle as well as implementation 'com.google.firebase:firebase-core:15.0.2' and apply plugin: 'com.google.gms.google-services' in android/app/build.gradle, the dependencies look like this:
com.google.android.gms:play-services-maps:11.+ -> 11.8.0 is still be in use but com.google.android.gms:play-services-base:11.8.0 -> 15.0.1 (*) and com.google.android.gms:play-services-basement:11.8.0 -> 15.0.1 (*) are changed to 15.0.1. The app crashed when calling something like _mapView.show(mapOptions);.
Add implementation 'com.google.android.gms:play-services-maps:15.0.1' in android/app/build.gradle, the dependencies look like this:
com.google.android.gms:play-services-maps:11.+ -> 15.0.1 and its dependencies com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 15.0.1 (*) and com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 15.0.1 (*) all are changed to 15.0.1 which are matched and map_view works properly again!
@patipol thank you very much. I add the "implementation 'com.google.android.gms:play-services-maps:15.0.1'" and activated just firebase_messaging plugin in pubspec.yaml and get the dependencies. No problem in here. I delete my project bin folder and rebuild the application. Now map_view works perfectly. I didn't add any firebase_messaging implementation yet. I will try to add today or may be tomorrow to see. Now in pubspec.yaml has this;
@patipol can you actually use map_view and firebase messaging and can you show me how to implement the dependencies in both build.gradele like showing me... (***************) what is exactly. Anything I try to implement I still get an error.
What went wrong:
Failed to capture snapshot of input files for task ':map_view:compileDebugAidl' property 'importDirs' during up-to-date check.
The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 11.8.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
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.
Activity
toregua commentedon Jun 26, 2018
Same error for me when i do :
Same code was working before I upgrade.
My LogCat on Android say :
My android/build.gradle file :
Seems to be a duplicate of 72 73
patipol commentedon Jul 4, 2018
It works for me after I have added the dependency of
com.google.android.gms:play-services-mapsinandroid/app/build.gradle.My
android/build.gradlelooks like this:And my
android/app/build.gradlelooks like this:I think dependencies of
map_vieware conflicted with those offirebase_messagingin this case.NTMS2017 commentedon Jul 4, 2018
Thanks @patipol
I add exactly what you post and I get below error:
My android build_gardel:
My android/app/build_gradel
ERROR:
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
FAILURE: Build failed with an exception.
Execution failed for task ':app:processDebugGoogleServices'.
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 20s
Finished with error: Gradle build failed: 1
patipol commentedon Jul 5, 2018
@NTMS2017 Could you please try investigating what dependencies
map_viewuses in different cases?By using
Please consider my cases.
map_viewwithoutfirebase_messaging, the dependencies look like this:It uses
com.google.android.gms:play-services-maps:11.+ -> 11.8.0which depends oncom.google.android.gms:play-services-base:11.8.0andcom.google.android.gms:play-services-basement:11.8.0, the versions are matched andmap_viewworks properly.map_viewwithfirebase_messagingby addingclasspath 'com.google.gms:google-services:3.2.1'inandroid/build.gradleas well asimplementation 'com.google.firebase:firebase-core:15.0.2'andapply plugin: 'com.google.gms.google-services'inandroid/app/build.gradle, the dependencies look like this:com.google.android.gms:play-services-maps:11.+ -> 11.8.0is still be in use butcom.google.android.gms:play-services-base:11.8.0 -> 15.0.1 (*)andcom.google.android.gms:play-services-basement:11.8.0 -> 15.0.1 (*)are changed to 15.0.1. The app crashed when calling something like_mapView.show(mapOptions);.implementation 'com.google.android.gms:play-services-maps:15.0.1'inandroid/app/build.gradle, the dependencies look like this:com.google.android.gms:play-services-maps:11.+ -> 15.0.1and its dependenciescom.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 15.0.1 (*)andcom.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 15.0.1 (*)all are changed to 15.0.1 which are matched andmap_viewworks properly again!Hope this helps.
NTMS2017 commentedon Jul 5, 2018
@patipol thank you very much. I add the "implementation 'com.google.android.gms:play-services-maps:15.0.1'" and activated just firebase_messaging plugin in pubspec.yaml and get the dependencies. No problem in here. I delete my project bin folder and rebuild the application. Now map_view works perfectly. I didn't add any firebase_messaging implementation yet. I will try to add today or may be tomorrow to see. Now in pubspec.yaml has this;
and seems no conflict now. My android/app/build.gradle look like this
NTMS2017 commentedon Jul 7, 2018
@patipol can you actually use map_view and firebase messaging and can you show me how to implement the dependencies in both build.gradele like showing me... (***************) what is exactly. Anything I try to implement I still get an error.
dependencies {
implementation ""
testImplementation ""
androidTestImplementation ""
androidTestImplementation ""
implementation ""
implementation ""
}
the error:
FAILURE: Build failed with an exception.
Failed to capture snapshot of input files for task ':map_view:compileDebugAidl' property 'importDirs' during up-to-date check.
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
Finished with error: Gradle build failed: 1
Project Build-Gradle:
App Build-Gradle:
patipol commentedon Jul 16, 2018
@NTMS2017 Every time trying each implementation, please make sure to stop running the app and start it again.
android/build.gradle:
android/app/build.gradle:
Hope this helps.