I'm writing an application with android studio 3.2.
Everything is okay when I install it on an emulator but when I make an apk and install it on real phone, it dosen't run!!
compileSdkVersion 28
minSdkVersion 16
targetSdkVersion 28
I want this app to be installed on android 4.1 or higher!
What changes are needed to run this app?
In your mobile open
setting > about mobile>Build number (press on it 7 times)
after that return to
setting > you will noticed that new choosing add (Developer options ) open it and make USB Debugging "active"
Press 7 times:
Finally: open it and make the USB Debugging active
Related
If I declare in the "AndroidManifest.xml" the permissions for Android 12+, when scanning it does not find those that are Android 11 or lower. I have the same problem the other way around.
I tried declaring in the AndroidManifest.xml the user permissions to be compatible with Android 12 or higher and it does not find the ones that are Android 11 or lower. I also tried declaring for Android 11 and it does not find those that are Android 12 or higher.
enter image description here
Here I declared to allow the two variants depending on which sdk the device has.
I'm using the following library -> text
Capacitor 7.5 and Ionic 6
Any idea why flutter apk release file fails to install on a Samsung A51 device?
I've tried the following to solve the problem.
Uninstall previous app
From phone settings -> applications, and enabled the option 'Allow app from unknown source
Update phone operating system to latest version
But the problem continued.
The error says: problem parsing package
Usually, the problem occurs when targetSdkVersion in android/app/build.gradle is less than the Android version installed on your phone.
For example
The targetSdkVersion is 29 but if your phone has installed Android 10 (SDK 30), it will not be able to install the file.
i tried to install google maps package but it doesn't work when i run the app
here is the pubspec.yamlenter image description here
and the error is :
enter image description here
i already tried aloder versions like google-maps:1-0-0 but it doesn't work and also updating the sdk will effect all the project
The minimum sdk must be greater that 20 for the plugin to use.
Go to android -> app -> build.grade and update the values as following
compileSdkVersion 31
minSdkVersion 21
targetSdkVersion 31
stop the emulator and run the app again
I am using Android Studio as SDK Platforms and SDK Tools. Currently, I have a problem when running the android emulator using Visual Studio. I have checked flutter doctor and no issues has been found. However, it shows an error as below.
As i run flutter run --verbose to search for the problems, it shows more details of the error as below
Just for sharing. Since I installed android studio, visual studio and flutter in my device using windows 11 pro, it doesn't work. However, I solved this problem by downgrading the Windows version into Windows 10 Home and it solved this particular problem. Anyone who face the same issue might try this in your current device.
This look like gradle compatibility issue.
Step to solve.
create new flutter project. try to compile the prject, if it work fine.
compare the android folder with yours and replace what is missing with the new flutter project you created.
sync your project after.
file/invalidateCache
flutter clean
flutter pub get
flutter run
you should be fine
To solve your error you have to update your compileSDKversion to the newest version which is currently 31.
You can find the compileSDKversion inside android > app > build.gradle
android {
compileSdkVersion 31
...
}
Note: you have to close and open android studio again
i would like to make possible to install and use my flutter application on a phone which has a android OS version 4.1, but when i run my code on a simulator the result is :
i cannot open the app no matter how many times i try it.
and my api and sdk versions are : minSdkVersion 16 targetSdkVersion 29
is my api version the problem? play store says about this the minimum OS compatible is 4.1 but it does not work