Issue 1:
I added firebase admob to my app and i have added google sevices file to app folder.It shows this error.Please help me resolve this.Platform is flutter.

run:

Using hardware rendering with device SM G615F. If you get graphics
artifacts, consider enabling software rendering with "--enable-software-
rendering".
Launching lib/main.dart on SM G615F in debug mode...
Initializing gradle... 3.0s
Resolving dependencies... 10.2s
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)
FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:preDebugBuild'.

Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0) and runtime (27.1.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 8s Gradle task 'assembleDebug'... Done 8.9s Gradle task assembleDebug failed with exit code 1

build.gradle:

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0' // google-services
plugin

}
}

allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
}

pubspec.yaml:

name: flutterapp
description: A new Flutter project.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1 #comment these 2 in case issues

environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
share: ^0.5.3
flutter_webview_plugin: ^0.3.0+2
launch_review: ^1.0.1
material_design_icons_flutter: ^2.7.94
shared_preferences: ^0.4.3
dio: ^1.0.6
flutter_downloader: ^1.0.6
path_provider: ^0.4.1
simple_permissions: ^0.1.9 #oreo fix
http: ^0.12.0
fluttertoast: ^2.1.3
flutter_staggered_grid_view: ^0.2.4 #any
flutter_local_notifications: ^0.4.2
url_launcher: any
flutter_custom_tabs: ^0.4.0
vibrate: ^0.0.4
splashscreen: ^1.1.0
nima: ^1.0.0
flare_flutter: ^1.0.0
firebase_admob: ^0.7.0 #0.5.2
firebase_analytics: ^1.0.6

dev_dependencies:
flutter_test:
sdk: flutter

build.gradle/app:

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"

def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

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.package"
minSdkVersion 16 //21
targetSdkVersion 28
versionCode 1
versionName "1.1"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}

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.release
}
}
}

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'

}
apply plugin: 'com.google.gms.google-services'

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.0.0, on Microsoft Windows [Version 10.0.17134.407], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] VS Code (version 1.29.1)
[√] VS Code, 64-bit edition (version 1.26.1)
[√] Connected device (1 available)

after adding this to my project/gradle:

subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}

i got this error:

Execution failed for task ':app:preDebugBuild'.
> Android dependency 'android.arch.lifecycle:runtime' has different version
for the compile (1.0.0) and runtime (1.1.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 27s
Gradle task 'assembleDebug'... Done 28.3s
Gradle task assembleDebug failed with exit code 1

help me find solution

thanks in advance

@ianloic @paulcbetts @sethladd @kevmoo @iampawankumar @tensor_programming @the4thfloor @sgraham

Issue 2:
i receive an error when i run flutter run

flutter run
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 0.7s
Resolving dependencies... 0.9s
Running 'gradlew assembleDebug'...
Configuration 'debugCompile' in project ':app' is deprecated. Use 'debugImplementation' instead.
Configuration 'profileCompile' in project ':app' is deprecated. Use 'profileImplementation' instead.
Configuration 'releaseCompile' in project ':app' is deprecated. Use 'releaseImplementation' instead.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Configuration 'debugProvided' in project ':apn_fb_login' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':apn_fb_login' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':firebase_messaging' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':firebase_messaging' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':google_sign_in' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':google_sign_in' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':image_picker' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':image_picker' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':share' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':share' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':shared_preferences' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':shared_preferences' is deprecated. Use 'releaseCompileOnly' instead.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.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.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
Gradle build failed: 1

My gradle.build file is:

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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 26
buildToolsVersion '26.0.3'

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.shuttertop.app"
minSdkVersion 16
targetSdkVersion 26
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 {
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'
}

apply plugin: 'com.google.gms.google-services'

flutter doctor:

[✓] Flutter (on Linux, locale en_US.UTF-8, channel alpha)
• Flutter at /home/luca/Programs/flutter
• Framework revision 8f65fec5f5 (4 weeks ago), 2017-12-12 09:50:14 -0800
• Engine revision edaecdc8b8
• Tools Dart version 1.25.0-dev.11.0
• Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.3)
• Android SDK at /home/luca/Android/Sdk
• Android NDK at /home/luca/Android/Sdk/ndk-bundle
• Platform android-26, build-tools 26.0.3
• ANDROID_HOME = /home/luca/Android/Sdk
• Java binary at: /home/luca/Programs/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Android Studio (version 3.0)
• Android Studio at /home/luca/Programs/android-studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Connected devices
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)