Skip to content

Instantly share code, notes, and snippets.

View aduquet's full-sized avatar
👩‍💻
Focusing

Aleja Duque-Torres aduquet

👩‍💻
Focusing
View GitHub Profile
@aduquet
aduquet / problems updating app-release.aab
Created October 31, 2022 21:51
keep getting this message in the play store Version code 1 has already been used. Try another version code
I got this solve by changing the versionCode Does not admit floats, and the versionName, I have not try modifying one a let the other tho
defaultConfig {
applicationId "your.applicationId"
minSdkVersion 23
targetSdkVersion 30
versionCode 1 // Change to a higher number
versionName "1.0.1" // Change to a higher number
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
@aduquet
aduquet / Build grade failure after Flutter update
Created September 29, 2022 14:58
Build grade failure after Flutter update
I was getting this error after updateing dart and flutter project
android:exported needs to be explicitly specified for element
<activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity>.
Apps targeting Android 12 and higher are required to specify an explicit value for android:exported
when the corresponding component has an intent filter defined.
See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
FAILURE: Build failed with an exception.
After searching and trying many things, adding these other activities solved the problem:
@aduquet
aduquet / dart
Created June 21, 2022 19:32
Async data on InitState method - dart/flutter
I was struggling in finding a way to load async data on Initial State method
I found the answer here: https://stackoverflow.com/questions/51901002/is-there-a-way-to-load-async-data-on-initstate-method
This is my concrete example
setInitialValueQuestionReview() async {
late DocumentReference<Map<String, dynamic>> testAnwDB = FirebaseFirestore
.instance
.collection('AppUsers')
@aduquet
aduquet / SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
Last active April 26, 2022 12:07
PIT error with IntelliJ IDE: 11:44:54 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR Exception in thread "main" org.pitest.util.PitError: Coverage generation minion exited abnormally!
I got this error:
C:\Users\duquet\.jdks\openjdk-15.0.1\bin\java.exe "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-junit5-plugin-0.15.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\xpp3_min-1.1.4c.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\xmlpull-1.1.3.1.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\xstream-1.4.8.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-entry-1.7.4.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-command-line-1.7.4.jar;C:\Users\duquet\AppData\Roaming\JetBrains\IdeaIC2021.2\plugins\pit-idea-plugin\lib\pitest-1.7.4.jar;C:\User
@aduquet
aduquet / No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase
Last active April 11, 2022 04:47
No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase
I had this problem, working with flutter and firebase
"No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase"
What I did to solve it was:
1. update firebase_core in the pubspec.yaml
2. I force the firebase to initialize before proceed whit this two lines
@aduquet
aduquet / read json file with flutter
Created March 27, 2022 11:52
I got an exceotion with 'type 'Null' is not a subtype of type 'String' ' in flutter
I got an exceotion with 'type 'Null' is not a subtype of type 'String' ' in flutter
════════ Exception caught by widgets library ═══════════════════════════════════
type 'Null' is not a subtype of type 'String'
════════════════════════════════════════════════════════════════════════════════
The problem was that my json file has some interger. then, I just fixed my json file with all strings :D and done!
@aduquet
aduquet / Flutter issues
Created March 25, 2022 08:21
type 'Future<dynamic>' is not a subtype of type 'Stream<Object?>?'
I was dealing with
type 'Future<dynamic>' is not a subtype of type 'Stream<Object?>?'
I had no Future types in my app however I did have something like this:
getQuestion(String id, String collectionName) async {
//var collection = FirebaseFirestore.instance.collection(collectionName);
// var querySnapshots = await collection.get();
// for (var snapshot in querySnapshots.docs) {
@aduquet
aduquet / FirebaseStore with Flutter
Created March 14, 2022 06:06
Reading data from firebaseStore with flutter... SOLUTION! :)
I spend a lot of time trying to access a specific document from firebase DB with flutter.
This is some links that help me
https://stackoverflow.com/questions/53517382/query-a-single-document-from-firestore-in-flutter-cloud-firestore-plugin
https://stackoverflow.com/questions/67575893/the-method-cant-be-unconditionally-invoked-because-the-receiver-can-be-nu
https://stackoverflow.com/questions/69624553/flutter-error-the-operator-isnt-defined-for-the-class-object
@aduquet
aduquet / gist:ce365c8e00bade71d17ddbfe6edc578f
Created February 26, 2022 15:12
Error in firebase with flatter
C:\Users\duquet\Documents\Personal\Empresa\quiz-flutter\quiz_app_v2\quiz\android\app\src\debug\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:cloud_firestore] C:\Users\duquet\Documents\Personal\Empresa\quiz-flutter\quiz_app_v2\quiz\build\cloud_firestore\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="io.flutter.plugins.firebase.firestore" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
@aduquet
aduquet / Problems with "yo code"
Last active September 10, 2021 12:49
Problems with "yo code" -> stderr: "'powershell' is not recognized as an internal or external command,\r\n"
Well, this error may looks silly, but I spent a lot of hours looking for the answer
after excecuting the command "yo code"
I got this error:
c:\Users\blalbalba\npm\node_modules\yo\node_modules\execa\index.js:347
thorw err;
and a lot of more things. The mos important was this error line
stderr: "'powershell' is not recognized as an internal or external command,\r\n" + 'operable program or batch file.\r\n',