Closed AbdulMustafa97 closed 3 years ago
Hi, I'm in the same situation, did you find a solution please ?
I am facing the same issue
Still nothing ?
I have fixed the issue in my fork :
https://github.com/SahilKr24/youtube_api
change your pubspec.yaml to :
dependencies: youtube_api: git: url: https://github.com/SahilKr24/youtube_api
then flutter clean, flutter pub get and try to build release apk. It should fix the issue.
Still nothing ?
Check my response.
I have a flutter app that uses youtube_api plugin.
When I run "Flutter build apk" and I get this output:
Application level build.gradle
`buildscript { ext.kotlin_version = '1.3.50' repositories { google() jcenter() }
}
allprojects { repositories { google() jcenter() } }
rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') }
task clean(type: Delete) { delete rootProject.buildDir } `
Project level build.gradle
`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) {
}
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { compileSdkVersion 28
}
flutter { source '../..' }
dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation 'com.google.firebase:firebase-analytics:17.2.2' }
apply plugin: 'com.google.gms.google-services'`
Flutter doctor gives this output:
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.720], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [√] Android Studio (version 3.6) [√] VS Code (version 1.43.1) [!] Connected device
Note: I had migrated the project to androidX