Android Studio 3.0 Unsigned Apk Not Installing - android-studio-3.0

After upgrading to android studio 3.0 the debug apk is saying App not istalled.
The package appears to be corrupted

Looks like we can not directly use the apk after running on the device from the build->output->apk folder.
After upgrading to android studio 3.0 you need to go to Build -> Build
Apk(s) then copy the apk from build -> output -> apk -> debug
Like this -

Fist Click On Build Icon on android studio after that click Build APK(s)
then Generate APK the copy Apk.
It is working perfact.

File-> Invalidate Caches/restart
solve problem for me.

I needed to create a signed APK for it to install correctly.

I have also faced the same problem after upgrading android studio to version 3.0!
To solve this issue you need to disable instant run that can be found under
File -> Settings -> Build,Execution,Deployment -> Instant Run. Now You need to re-generate a signed apk with both the signature versions enabled i.e V1 & V2 that can be found under Build -> Generate Signed APK Now try to install the signed apk, this time it should be installed perfectly :).

So the message "App Not Installed" will refer to multiple causes, and please returning to Android Studio 2.3. from 3.0 is not an option at all!
When we upgrade from Android Studio 2.3 to 3.0 we can find some configuration issues caused mainly by the support libraries, that will cause that our application could not be installed.
To avoid this problem we need to invalidate cache in Android Studio 3.0+ and the problem will be solved.
So File -> invalidate cache and restart
This one is solution that worked for me...

In the latest version of Android Studio (4.1.1) just rebuild the project. (Build>Rebuild Project).
Then get you apk at AndroidStudioProjects<Project Name>\app\build\outputs\apk\debug.
Hope it'll work!

first clean your project.
delete old apk and json file in debug folder.
then re generate build apk.
it works.

Related

How can I fix "Checking Dart SDK version... << was unexpected at this time" error in Flutter?

I am facing an issue any time I try to run any app or flutter command from the terminal, this is displayed: Checking Dart SDK version... << was unexpected at this time.
Not even flutter doctor works.
Nothing seems to work and it's so frustrating as it happened out of the blue. One moment everything was fine, now nothing works. Any help will be appreciated
I've resolved this error with the below steps:
Go to C:\Users\{Name}\.gradle} - Delete the .gradle directory.
Then Download and install the same flutter and dart SDK version in some other location and set the environment variables.
Example:
Environment variables Before :
("D:\FlutterExtractedFiles\flutter\bin")
("D:\FlutterExtractedFiles\flutter\bin\cache\dart-sdk\bin")`
Environment variables After :
("C:\edgedownloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin")
("C:\edgedownloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin\cache\dart-sdk\bin")
Then check the Android Studio event log
I've resolved this error by following these steps:
Go to folder C:....\Flutter\
Run this command: git reset --hard HEAD
This will restore the flutter SDK folder to its original state, so no need to reinstall the SDK.
Flutter reinstalled worked for me..
delete flutter folder in C directroy.
make a src folder in C: directory.
GoTo cmd and install flutter from official flutter github repoC:\src>git clone https://github.com/flutter/flutter.git -b stable
https://flutter.dev/docs/get-started/install/windows
run flutter doctor
set env path.
DONE
What worked in my case was deleting the .gradle file (C:\Users\USER.gradle) and reinstalling Flutter in another location and changing the PATH to it.
you should try this
restart your pc and delete the flutter folder in C directory then reinstall flutter and run flutter doctor
For me, the following steps resolved the problem:
Open cmd and run flutter doctor. (if there is an issue resolve them first.)
If not then change the flutter channel to dev. Whatever your channel is?. If this is the dev channel then change to master channel.
Again flutter doctor. If everything goes perfectly. then run your project. If it runs accordingly then again change to channel to stable.
I faced this error before, all I had to do was to:
Remove Flutter from my C directory.
Install Flutter from the official website.
Run Flutter doctor: flutter doctor
No need for changing the PATH or any further actions.
If it worked fine with you then you are all done!
I faced another error after it, related to the Dart SDK and solved it using this link
the key is to install Android SDK Command-line Tools, steps being:
Open Android Studio Tools Menu, SDK Manager In the window that comes
up there are inner panels, choose SDK Tools panel Tick Android SDK
Command-line Tools Choose Apply button near the bottom of the window
At that point, you will be prompted to accept the SDK license and the
command line tools will be installed. Your license issue should now be
resolved.
If your using Intelij and get the << error and none of the above work.
Delete the .intelij folder in your project and reopen the folder in intelij.
I faced this problem too and I've solved it by downloading SDK file again.

Flutter ios No podspec found for `flutter_keyboard_visibility_web` in

Iam using Flutter in Mac -> Android studio and when I write pod install in the terminal. It show me
Analyzing dependencies
[!] No podspec found for `flutter_keyboard_visibility_web` in .symlinks/plugins/flutter_keyboard_visibility_web/ios`
Iam using flutter from one year ago, It is the first time it happen for me.
I cannot run the app. I dont have a plugin with this name flutter_keyboard_visibility_web in pubspec
How to fix it, thanks
The solution is:
1- Delete Podfile and Podfile.lock from ios folder
2- Flutter clean either from terminal
or from Android studio -> Tools -> Flutter -> Flutter Clean
3- Pod install
4- Run the app
The solution is here:
https://github.com/MisterJimson/flutter_keyboard_visibility/issues/52
I had the same issue, but I cleared cache on IntelliJ and it started working again.
To do this on IntelliJ:
From the main menu, select File | Invalidate Caches / Restart.
In the Invalidate Caches dialogue, select an invalidate the caches and restart the IDE.

Alternative for hybrid web app without knowledge in app/server

i used to upload my ZIP (with HTML5/CSS web app) in phonegap since 4, 5 years and create cool mobile apps. But since some months it's look like Adobe dismiss the project, no more answer on forum etc.
Is there a good solution, when you don't know everything about shift/cocoa/java and server things, to simply upload your webapp (basically a website in a zip) and get IPA/APK ?
I heard about monaco or voltbuilder. Thanks
Not really. Although I can confirm https://build.phonegap.com works for me. If you have an error related to a malformed xml, you can try to delete the project on the website and re-uplading the zip file onto a new project. That's a bug I have experienced in the past.
Otherwise, you can install Cordova and Phonegap on your pc to build it using npm on the terminal (Linux/MacOs).
$ sudo npm install -g cordova
or for windows (CMD):
C:\> npm install -g cordova
then navigate with the command line using cd to go to a folder
eg. cd myfolder.
You can see the files in your current directory with ls (Linux/MacOs) or lsdir (windows)
Once you are in your project's folder and that you can see with lsdir or ls your config.xml file of your project, then you can run those commands to add the platform you want to build:
cordova platform add ios
cordova platform add android
Finally to build the app, you need to:
cordova build
Note: To build an Ipa, you will need to use a device running MacOs since it requires XCode. I highly recommand you to get familiar with Cmd or the terminal if you are building an app.
I hope I have answered your question well

Xcode 11.4 compile error 'Missing package product <package name>'

When I integrate a local package in my Xcode project everything is fine initially but when i switch branches and want to run the app Xcode gives me the compile error Missing package product <package name>. When I quit Xcode and re-open it everything is fine again. Any idea what this can be? An Xcode bug?
We also integrate external packages via Swift Package Manager which works perfectly fine. No issues there.
The issue is also well described in a post by Jesse Squires.
Solution 1: File > Swift Packages > Reset Package Caches
Solution 2: File > Swift Packages > Update to Latest Package Versions
For me, I needed File > Swift Packages > Reset Package Caches
In Xcode go to File > Swift Packages > Update to Latest Package Versions
Worked for me
In Xcode go to Product > Clean Build Folder
This worked for me. The problem originally started when I was trying to solve another issue that came up after I deleted my Derived Data folder.
Restarting Xcode didn't work, but cleaning the build folder did. I don't know if the other answers here would work for me because I didn't try them seeing as cleaning the build folder worked.
I bumped into this issue today on Xcode 13.0 when working on the WooCommerce iOS app after manually deleting the DerivedData folder.
The build was failing like in the questions description: Missing package product '<package name>'
I tried both resetting the packages cache and updating to the latest versions, but neither work. Thinking about it, that's not surprising since the packages Xcode couldn't find were local packages.
What did the trick for me was following this suggestion from an Apple forums thread and remove the local packages references, then adding them back again.
In WooCommerce's case, the local packages are part of a workspace file. Removing then adding them back again in the same order didn't result in a diff in the file. That is, nothing really changed in the workspace setup, but that was apparently the kind of kick Xcode needed to get over that error. 🤷‍♂️
I'm not sure of the root cause, but I get this quite regularly. Not the most elegant solution, but neither Reset Package Caches nor Update to Latest Package Versions worked for me. For me, I had to quit Xcode, and delete DerivedData.
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Then rebuild.
None of the answers worked for me on Xcode 12.5 beta. I had to manually remove all spm packages and re add them.
SPM - Reset Package Caches vs Update to Latest Package Versions
File -> Swift Packages -> Reset Package Caches
File -> Swift Packages -> Update to Latest Package Versions
Update to Latest Package Versions
fetch the latest possible version(based on restrictions)
Reset Package Caches
reset cache(derived folder) -> Update to Latest Package Versions
folder
<path_to_derived_data>/<randomizer>/SourcePackages/checkouts/<project_name>
//e.g
/Users/alex/Library/Developer/Xcode/DerivedData/SPM-dpsmlyjrashqjefkfheppizcrgic/SourcePackages/checkouts/SPMExperiments
[Local SPM]
I tried:
Clean project
Clean derived data
Resolve Package Versions (File > Package)
Update to Latest Package Versions (File > Package)
Restart Xcode
Restart Mac
And restarting the Mac is what worked 🥲
Others say doing "Resolve Package Versions" multiple times also work.
I got this error when having the same local Swift package open in two different instances of Xcode in two different projects. Got it working again by quitting Xcode and only having one project open at a time.
A workaround for me at the moment has been both running Product > Clean Build Folder (cmd-k) and then restarting Xcode. This is an issue in both Xcode 12.4 and 12.5, and 12.5's per user package caching did not resolve the issue.
File > Swift Packages > Reset Package Caches also appears to work but it is slower for me.
Context:
One of my vendors distributes their pre-compiled binary library via SPM. Whenever I switch between git development branches, I get:
"artifact of binary target 'xyz' failed extraction: The operation couldn’t be completed. (TSCBasic.StringError error 1.)"
It also causes these "missing package product" errors for totally unrelated packages presumably because if one package fails the whole SPM process fails ("resolving package graph failed") even if these package are entirely independent.
Edit: With Xcode 12.5 simply quitting Xcode and re-opening seems to be enough.
Start with the other answers like
Reset Package Caches
Product > Clean Build Folder
If this doesn't help...
In my messages I found a hint that I had a dependency to two different version of the same package.
After fixing this, Reset Package Caches suddenly worked for most of my packages.
I could fix the remaining problems by adding
platforms: [
.iOS(.v13),
],
to the corresponding package. Before that, I had no platforms statement.
Xcode Source Control should be enabled to run this.
Preference -> Source Control and enable the source control.
If none of the above answers work, Please refer the solution shared by GravityBytes in this link on Apple Forums.
Eventually he happened to share the below resolution
I eventually got this resolved. What seemed to get it working was re-adding my local packages using the "Add Packages…" menu option on the project that has the framework targets using the local package. This created a new "Packages" group in the project, and eventually started compiling correctly.
Please remove the existing references and try adding them using the above approach.
Just a silly question: did you set up your git account on Xcode preferences?
For Moya I had to edit project file to Xcode heart's content
/* XCRemoteSwiftPackageReference "Moya" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Moya/Moya";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 13.0.2;
};
anything other than 13.0.2 results in unresolutio for the numerous semicircular dependencies that Moya package brings to the table.
This breathes a new life into https://foldoc.org/field+circus
I had this issue after the current branch rename in the project and resolve it by clearing xcuserdata in workspace.
Nothing worked for me except Product -> Clean Build Folder and Restart
For me, Xcode was opened using Rosetta which wans't enabled before. Disabling Rosetta helped me 💪🏼
In Xcode 12.0.1 (12A7300) this bug has been fixed. It was auto-resolved by the Xcode update for me.
EDIT Xcode 12.5 [beta]
Apple added a SPM cache. See my question here. If you run into this problem with this Xcode version it might help to delete this cache.

Build flutter app for desktops

I saw a few peoples managed to build flutter apps for other OS than the usual Android/IOS
My question here is simple : How ? What is the current process to build a flutter app for mac/windows ? There's no need for it to be production ready. Something experimental is enough
For those wondering how to :
https://github.com/google/flutter-desktop-embedding
There's an example using openGL to render a flutter app
Run a Flutter project in Desktop
Step 1:
For Flutter to run on Desktop, we must be on the master channel, with the latest release. So run from cmd,
flutter channel master
and
flutter upgrade
Step 2:
Then we have to enable flutter desktop support.
set ENABLE_FLUTTER_DESKTOP=true
Step 3:
Then clone this repo and cd example directory.
Step 4:
Then replace the lib folder inside the example directory with our existing code, and replace the pubspec.yaml file, with our existing one.
Step 5:
Then run from terminal
flutter packages get
and
flutter run
You can find more info here.
You can check this link out
https://github.com/google/flutter-desktop-embedding
Still not stable but does a good job of rendering flutter apps on desktop
Here's something I found useful, it is currently in alpha version but does the job by enabling us to develop Mac and Windows apps in Flutter :
https://feather-apps.com/
For those who want to know the current state(2021), here is the startup project to help you test It for MacOS, Linux, Windows. The project heavily modified from official ci to build cross-platform easily. You might want to check the ci.yml If you want to build on certain platform without github-action.
In additional, go-flutter is also a valid option, that used go-lang and openGL to achieve cross-platform features.
If you want to know the difference between official and go-flutter, here is the issue about the details.

Resources