Comments (10)
Could you show your build.gradle
?
from flutter_downloader.
Sure, it is as follows:
import com.google.gms.googleservices.GoogleServicesPlugin
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.")
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
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
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "<APPLICATION-ID>"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.support:support-v4:28.0.0"
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:cardview-v7:28.0.0"
implementation "com.android.support:customtabs:28.0.0"
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'
GoogleServicesPlugin.config.disableVersionCheck = true
from flutter_downloader.
I've just published a new version that upgrades compileSdkVersion
to 28. I try turning multiDexEnabled
to true
and example project works well. To be honest, I don't know what your issue comes from but I see your configuration of gradle
contains some components from android support libraries, there're probably conflictions among them. You can try to upgrade to latest version of this plugin and let me know if the problem still occurs
from flutter_downloader.
I updated to the latest version and the issue still persists. I have created a new project and started adding my plugins one by one, and the conflicts seems to be with cloud_firestore
(luckily the first one I tested). Could the Firebase SDK have conflicting components?
from flutter_downloader.
This issue is related to WorkManager
dependency: https://issuetracker.google.com/issues/116154359
To work around it, place following code in your build.gradle
file (in android
folder, not app
folder):
configurations.all {
exclude group: 'com.google.guava', module: 'listenablefuture'
}
from flutter_downloader.
I will close this issue. You can re-open it if you need more help
from flutter_downloader.
I still get the same error:
com.android.build.api.transform.TransformException: Error while generating the main dex list.
I have tried the snipped you gave me and the one suggested in the answer, but none of them work. I have also tried excluding the module in the build.gradle of your plugin, but then the compilation would fail because it can't find the module (duh).
from flutter_downloader.
I've tried some ways to configure gradle
file, but there's nothing worked. We may as well wait for the next release of Guava to resolve this issue.
from flutter_downloader.
I've just released a new version to deal with this issue. I've tested on the example project and it can be compiled with firebase
libraries now. But to get it worked, you have to add some additional configuration in gradle
file, add following codes in file build.gradle
inside android
folder:
configurations.all {
exclude group: 'com.google.guava', module: 'failureaccess'
resolutionStrategy {
eachDependency { details ->
if('guava' == details.requested.name) {
details.useVersion '27.0-android'
}
}
}
}
from flutter_downloader.
@derTuca , Have you worked around this issue yet?
from flutter_downloader.
Related Issues (20)
- 下载进度到达100后又返回错误 HOT 1
- no such column: save_in_public_storage (code 1 SQLITE_ERROR) HOT 1
- Download is getting failed in android when i am saving files in local directory. It is working only when i am giving saveInPhoneStorage:true.
- Downloading not working suddenly say download complete
- Download is Not Working HOT 2
- LoadTasksWithRawQuery not working
- 'failed to set registerPlugins' in integration with flutter module
- Negative progress HOT 3
- In iOS ,i get a sql error
- Wrong file Content Type (application/octet-stream)
- flutter downloader is not downloading in Android versions of 13 and 14 HOT 2
- Please add download with encrypt
- File not saving in private storage without WRITE_EXTERNAL_STORAGE permission
- Downloading not Starting on OPPO with android 11 HOT 1
- file uploader
- Downloading fails often in android 10.
- Issue while Opening the file HOT 2
- java.lang.NullPointerException(DownloadWorker.kt:395)
- android api 34, sendCancelIfRunning: isInProgress=falsecallback=io.flutter.embedding.android.FlutterActivity
- Can we override flutter downloader to download from URLs with self-signed certificates to avoid errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_downloader.