Closed lalo-vergel closed 4 years ago
This seems to be the culprit (I have no experience with Kotlin, I need help):
val db = TemporaryDatabase(context)
val allowedChars = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz0123456789"
val id = (1..20)
.map { allowedChars.random() }
.joinToString("")
contentValues.put(MediaStore.Images.Media._ID, id)
db.writableDatabase.insert(TABLE_NAME, null, contentValues)
return id
@lalo-vergel Please refer to the following. https://github.com/ko2ic/image_downloader/wiki#compilation-error-in-kotlin-random
Hi. When trying to run the app both on Android Simulator or a physical Android device, I get the following error that won't let the build finish:
e: /Users/carlosvergel/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.19.1/android/src/main/kotlin/com/ko2ic/imagedownloader/ImageDownloaderPlugin.kt: (354, 41): Unresolved reference: random
FAILURE: Build failed with an exception.
I am running on AndroidX, and I have many other packages that require AndroidX and run well. Both my android simulator and physical device run Android 9.
I read that invalidating and restarting the caches in Android Studio might help. Did it. No use.
Package works great for iOS.