Flutter Fix
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ The plugin google_maps_flutter_android requires a higher Android SDK version. │
│ Fix this issue by adding the following to the file D:\Development\ULTIMAT POS\App POS Backup\UltimatePOS_Flutter_1.7.1\pos\android\app\build.gradle: │
│ android { │
│ defaultConfig { │
│ minSdkVersion 20 │
│ } │
│ } │
│ │
│ │
│ Note that your app won't be available to users running Android SDKs below 20. │
│ Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.
│
│ For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration
Replace minSdkVersion 20 in file build.gradle at folder Android/app/
in your project folder, look for that file:
android\app\build.gradle
open it in your editor, and search for this:
minSdkVersion flutter.minSdkVersion
replace it with this:
minSdkVersion 20
Related
I'm trying to make my Android gradle folder structure as flat as possible. I'm hoping for something on the lines of this:
─ ~/my_projects/
└─ project_a/
├─ java/
│ └─ com/me/project_a/MainActivity.java
├─ javatests/
│ └─ com/me/project_a/MainActivityTest.java
├─ res/
│ ├─ drawable/...
│ ├─ layout/...
│ └─ values/...
├─ *.gradle
└─ AndroidManifest.xml
Is there a way to structure my gradle files so that I can have a structure this flat while still building via gradle and getting Android Studio to recognize everything?
I need to identify the current connection type (etc 3G, 4G, 5G). I've used the ConnectivityManager but on some phones, the reported connection is 4G even if the download speed is so big that the phone is clearly on 5G.
Here I found a possible way to fix it. I need to check it on different devices.
I was wondering whether there is a way to use Firebase test-lab to do it. I used Firebase test-lab in the past but I was always mocking the network connection to run instrumentation tests so I don't know whether it is possible to actually use a cellular connection and whether it is possible to choose the SIM card used.
EDIT
Following the suggestion I'm using gloud beta. I run gcloud firebase test network-profiles list and I have got the following list:
┌────────────┐
│ PROFILE_ID │
├────────────┤
│ LTE │
└────────────┘
┌──────┬────────┬────────────┬───────────────────┬───────────┬───────┐
│ RULE │ DELAY │ LOSS_RATIO │ DUPLICATION_RATIO │ BANDWIDTH │ BURST │
├──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│ up │ 0.040s │ 0.001 │ │ 16000.0 │ │
│ down │ 0.040s │ 0.001 │ │ 16000.0 │ │
└──────┴────────┴────────────┴───────────────────┴───────────┴───────┘
┌────────────┐
│ LTE-poor │
└────────────┘
┌──────┬────────┬────────────┬───────────────────┬───────────┬───────┐
│ RULE │ DELAY │ LOSS_RATIO │ DUPLICATION_RATIO │ BANDWIDTH │ BURST │
├──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│ up │ 0.060s │ 0.0015 │ │ 4000.0 │ │
│ down │ 0.060s │ 0.0015 │ │ 4000.0 │ │
└──────┴────────┴────────────┴───────────────────┴───────────┴───────┘
┌────────────┐
│ HSPA │
└────────────┘
┌──────┬────────┬────────────┬───────────────────┬───────────┬───────┐
│ RULE │ DELAY │ LOSS_RATIO │ DUPLICATION_RATIO │ BANDWIDTH │ BURST │
├──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│ up │ 0.060s │ 0.001 │ │ 2000.0 │ │
│ down │ 0.060s │ 0.001 │ │ 4000.0 │ │
└──────┴────────┴────────────┴───────────────────┴───────────┴───────┘
┌────────────┐
│ HSPA-poor │
└────────────┘
┌──────┬────────┬────────────┬───────────────────┬───────────┬───────┐
│ RULE │ DELAY │ LOSS_RATIO │ DUPLICATION_RATIO │ BANDWIDTH │ BURST │
├──────┼────────┼────────────┼───────────────────┼───────────┼───────┤
│ up │ 0.100s │ 0.0015 │ │ 500.0 │ │
│ down │ 0.100s │ 0.0015 │ │ 1000.0 │ │
└──────┴────────┴────────────┴───────────────────┴───────────┴───────┘
...
5G is not in the list (yet). And the result is the same with gcloud beta firebase test network-profiles list
Devices in Firebase Test Lab are connected via WiFi by default. There's no guarantee that a device has a SIM at all, and you should not rely on that. Your best choice is to use a specific network profile, which can be configured as part of the test.
You can list all available network profiles and their settings with the command below:
$ gcloud firebase test network-profiles list
You can set the network profile by using gcloud beta, as the setting is not GA yet:
$ gcloud beta firebase test android run \
--network-profile=LTE \
<your other args>
I'm building a library module that might be used in an Android application. In a certain part of the code, I need to load a JavaScript file so the script engine runs it. My file structure looks something like this: https://i.snag.gy/R7hHPI.jpg
└───src
├───main
│ ├───java
│ │ └───calegari
│ │ └───murilo
│ │ └───qacadscrapper
│ │ │ QAcadScrapper.java
│ │ │
│ │ └───utils
│ │ Grade.java
│ │ Subject.java
│ │ User.java
│ │
│ └───resources
│ └───lib
│ Barrett.js
│ BigInt.js
│ RSA.js
│
└───test
├───java
│ └───calegari
│ └───murilo
│ └───qacadtest
│ QAcadTest.java
│
└───resources
When building the artifact, I configure it so IntelliJ puts the contents of the /resources folder on root folder of the Jar file:
https://i.snag.gy/fN4z6t.jpg
These are the contents of the .jar file: https://i.snag.gy/QPR9XK.jpg
├───calegari
│ └───murilo
│ └───qacadscrapper
│ └───utils
├───com
│ └───sun
│ └───script
│ ├───javascript
│ └───util
├───javax
│ └───script
├───lib ---> Here are the JavaScript files
├───META-INF
│ ├───maven
│ │ └───org.jsoup
│ │ └───jsoup
│ └───services
├───org
│ ├───jsoup
│ │ ├───helper
│ │ ├───internal
│ │ ├───nodes
│ │ ├───parser
│ │ ├───safety
│ │ └───select
│ └───mozilla
│ ├───classfile
│ └───javascript
│ ├───annotations
│ ├───ast
│ ├───commonjs
│ │ └───module
│ │ └───provider
│ ├───debug
│ ├───jdk13
│ ├───jdk15
│ ├───json
│ ├───optimizer
│ ├───regexp
│ ├───resources
│ ├───serialize
│ ├───tools
│ │ ├───debugger
│ │ │ └───treetable
│ │ ├───idswitch
│ │ ├───jsc
│ │ ├───resources
│ │ └───shell
│ ├───typedarrays
│ ├───v8dtoa
│ ├───xml
│ └───xmlimpl
└───sun
├───misc
├───reflect
└───security
├───action
└───util
But when I try to install the APK I receive a "INSTALL_FAILED_NO_MATCHING_ABIS" error. I'm pretty sure that what's causing it are these .js files under /lib, since the error disappears if I remove them from the .jar build.
Library is configured using Gradle.
How can I avoid this error? Hope someone can help!
Update
I made IntelliJ add the .js files alongside the Java files inside my jar package, it works when running from the .jar file, but if I try to run some tests in IntelliJ it doesn't work, since gradle isn't adding the files to the compiled code...
Solution
I was able to make it work by moving the files to inside the source path and adding this to the gradle.build file:
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDir 'src/main/java'
include '**/*.js'
}
}
test {
java {
srcDirs = ['src/test/java']
}
}
}
i had this problem using bitcoinJ library (org.bitcoinj:bitcoinj-core:0.14.7) added to build.gradle(in module app) a packaging options inside the android scope. it helped me.
android {
...
packagingOptions {
exclude 'lib/x86_64/darwin/libscrypt.dylib'
exclude 'lib/x86_64/freebsd/libscrypt.so'
exclude 'lib/x86_64/linux/libscrypt.so'
}
}
I'm trying to use Firebase Test Lab to run instrumentation tests of my Android app but some tests failed because the currency symbol is not euro (€) but the standard currency sign (¤).
The locale is well defined (French) and it works without problem on my local machine.
Am I supposed to not hard-write the € symbol in the test class and get it dynamically with Currency class ? But the good practise is to always hard-write the expected value...
Expected: with text: is "0,00 €"
Got: "AppCompatTextView{id=2131296465, res-name=total, visibility=VISIBLE, width=1071, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams#120f8796, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=0,00 ¤, input-type=0, ime-target=false, has-links=false}"
one can pass the desired locale to test-lab with the --device parameter.
as the documentation for gcloud firebase test android run reads:
--device is now the preferred way to specify test devices and may not be used in conjunction with --devices-ids, --os-version-ids, --locales, or --orientations. Omitting all of the preceding dimension-related flags will run tests against a single device using defaults for all four device dimensions.
--device model=shamu,version=23,locale=fr_FR,orientation=default
else it will just use the default locale en - which results in that ¤ unspecified currency symbol.
to assume that French locale means the € as currency symbol might be wrongful; because when running gcloud firebase test android locales list, it outputs quite a bunch of the colonies:
│ fr │ French │
│ fr_BE │ French │ Belgium
│ fr_BF │ French │ Burkina Faso
│ fr_BI │ French │ Burundi
│ fr_BJ │ French │ Benin
│ fr_BL │ French │ Saint Barthélemy
│ fr_CA │ French │ Canada
│ fr_CD │ French │ Congo (DRC)
│ fr_CF │ French │ Central African Republic
│ fr_CG │ French │ Congo (Republic)
│ fr_CH │ French │ Switzerland
│ fr_CI │ French │ Côte d’Ivoire
│ fr_CM │ French │ Cameroon
│ fr_DJ │ French │ Djibouti
│ fr_DZ │ French │ Algeria
│ fr_FR │ French │ France
│ fr_GA │ French │ Gabon
│ fr_GF │ French │ French Guiana
│ fr_GN │ French │ Guinea
│ fr_GP │ French │ Guadeloupe
│ fr_GQ │ French │ Equatorial Guinea
│ fr_HT │ French │ Haiti
│ fr_KM │ French │ Comoros
│ fr_LU │ French │ Luxembourg
│ fr_MA │ French │ Morocco
│ fr_MC │ French │ Monaco
│ fr_MF │ French │ Saint Martin
│ fr_MG │ French │ Madagascar
│ fr_ML │ French │ Mali
│ fr_MQ │ French │ Martinique
│ fr_MR │ French │ Mauritania
│ fr_MU │ French │ Mauritius
│ fr_NC │ French │ New Caledonia
│ fr_NE │ French │ Niger
│ fr_PF │ French │ French Polynesia
│ fr_PM │ French │ Saint Pierre and Miquelon
│ fr_RE │ French │ Réunion
│ fr_RW │ French │ Rwanda
│ fr_SC │ French │ Seychelles
│ fr_SN │ French │ Senegal
│ fr_SY │ French │ Syria
│ fr_TD │ French │ Chad
│ fr_TG │ French │ Togo
│ fr_TN │ French │ Tunisia
│ fr_VU │ French │ Vanuatu
│ fr_WF │ French │ Wallis and Futuna
│ fr_YT │ French │ Mayotte
Im trying to install a module 'eGalax, eTurboTouch CT-410/510/700 device support' and its not showing up in my kernel config menu, when I search for it is listed, I suspect it has something to do with the EXPERT option below, how do I enable this?
│ Symbol: TOUCHSCREEN_USB_EGALAX_REVERSE [=n] │
│ Type : boolean │
│ Prompt: eGalax Special reverse MSB / LSB Packet │
│ Defined at drivers/input/touchscreen/Kconfig:553 │
│ Depends on: !S390 && INPUT [=y] && INPUT_TOUCHSCREEN [=y] && TOUCHSCREEN_USB_EGALAX [=n] && EXPERT │
│ Location: │
│ -> Device Drivers │
│ -> Input device support │
│ -> Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y]) │
│ -> Touchscreens (INPUT_TOUCHSCREEN [=y]) │
│ -> eGalax, eTurboTouch CT-410/510/700 device support (TOUCHSCREEN_USB_EGALAX [=n])
In kernel 2.6.37 EXPERT became EMBEDDED.