I have an Android app that I made maybe like 2 years back. I never deployed it to google store as it really is just for me.
I deployed it on my phone and installed via apk or through VS itself (I can't remember).
I recently formatted my phone and now would like to get my app back. I still have the code and opened it in VS 2017, it did an upgrade of my project but I can't figure out how to deploy it to my phone.
I enabled developer mode but still can't figure it out. I tried to copy the apk that VS generated but when I try to install it, I just get "it is corrupt and can't install".
The app is extremely simple. It is one screen with 6 textboxes and 1 dropdown on it.
Just trying to get it back on my phone as fast as possible so I can use it.
I do get some error when I try to see if it will load on the emulator in VS 2017
Severity Code Description Project File Line Suppression State
Error ADB0010: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
0
This is only easiest way you are doing. Plug your device via USB cable & press F5.
I am sure you need to check all supported CPU architectures in Visual Studio.
Right click on your project- go to properties
Properties-->Android options-->Advanced-->Supported Architecures
armeabi;
armeabi-v7a;
x86;
x86_64
& check if available, uninstall your app from your real device
settings->apps->uninstall.
Hope it help you.
Related
I used Microsoft's "Preparing an Application for Release" and "Signing the Android Application Package" tutorials in order to run an APK of an app I built on my Samsung Galaxy S8 phone.
When I try to run the APK, I am getting a message "Do you want to install an update to this existing application?...", and when tap "install", it shows an "installing" screen, and after couple of seconds I am getting a message "App not installed".
I have done these steps couple of times, each time I got the same result.
Did it happen to anyone?
Is there a way to know for 100% what causes this problem? There is not error code and it leaves me hanging.
I would like to thank #Blu and #Cheesebaron for their guidance.
OK, so after trying to understand where my error was (a lot of ctrl+f's), I had:
"failure copying native libraries error code=-113".
This means I had to my app.Android in Solution Explorer -> Properties -> Android Options -> Advanced -> unchecked all except the last one, then unchecked it, and it checked right back what was needed for it to work.
Then it didn't work AGAIN.
So I looked up again in logcat (after trying to install again, so that I will see the new error), and I found this:
"signatures do not match previously installed version; ignoring!".
I went to Settings -> Apps -> searched my app by its name -> Uninstalled.
Then I tried installing again, and it worked!
BTW, for the sake of other people - How to use logcat? (generally! you may experience some issues, google it and you'll do fine):
Connect your phone to your computer.
go into: c:\Users\YOURUSERNAME\AppData\Local\Android\Sdk\platform-tools
type "adb logcat".
I have accidentally formatted the hard drive where I had all of my projects. The project I'm currently working on is completely lost, but I have the app running on my device. I didn't generate an apk, I just ran it using the 'run' option in Android Studio to test as a wrote the code.
Is there a way to retrieve the source code in this case? I have tried extracting the apk from the device (inside \data\app[package name]) and using several decompilers tools available, but none of them show me any of my code.
Thanks in advance.
I've been trying for the last several days to build and run the GameMaker: Studio Android Google Mobile Ads app demo on my Samsung Galaxy S6. I finally have all the correct things installed I believe, and I've managed to solve a few other build errors before this, but I've hit a brick wall and despite all my searching I have not found an answer. My problem is very similar to this post's which poster said he solved by setting the build tools to the latest version. I don't know what he means by that.
The full compile form is too long to fit in a StackOverflow question, but I believe the only really relevant bit is the exception line:
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\gunna_000\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
I've been pulling my hair out with this and any help would be immensely appreciated.
I followed the GameMaker: Studio Android instructions perfectly, with the only hiccup being the local IP address, which is supposed to be in the format xxx.xxx.xxx.0/24 such as 192.168.1.0/24. My IPv4 adress is 10.0.1.129. Not knowing what to do, I entered 10.0.1.0/24 into the Web Server IP allowed list, ignoring the last number. However I do not believe that really has anything to do with this problem, as I'm trying to run the GM:S app on my Android device over USB cable.
I believe I have all the right modules installed in the Android SDK Manager:
And my JDK, SDK, NDK, and Keystore are all accepted it seems:
I've been able to run and install Android apps made in Android Studio from this computer to this Android device (Android version 6.0.1), but GameMaker: Studio is just not having it. (And just to verify, I have bought GameMaker: Studio Professional and Android)
I don't have any weird extensions or plugins. I'm simply trying to run a GameMaker: Studio application on my Android device. Please help. Thank you.
If you still haven't solved this:
Make sure your PC doesn't have a pending Windows update (if you use Windows).
Make sure your phone is in the right mode to accept files and install from GameMaker.
Try to run a very simple project with only an empty room.
Make sure to have all packages up-to-date.
Potentially reinstall the hole Android SDK lib.
Make sure that your device is connected and is found by the ADB.
If GameMaker tries to start the network connection between your PC and the Android device, it means that it failed doing so over the cable.
Getting error while installing apk via android studio.
Failure [INSTALL_FAILED_INTERNAL_ERROR]
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APK
i tried build:clean
also restart device..
error not resolves.
Disabling Instant run fixed it for me
Go to Preferences>Builld,Execution, Deployment> Instant Run
Then unmark Enable instant Run to hot swap code ...
Sorce from the comments in here
And also don't forget to report the issue to google to be fixed faster.
I have solved this problem by turning off MIUI optimization.
For this go to setting-> developerOptions-> MIUI Optiomization.
Update:
Apart from above solution. If you are using Android studio version 3.0 or 3+ then we can not directly use the apk after running on the device from the build->output->apk folder.
instead we need to build apk as stated below.(this is not a signed apk)
go to Build -> Build Bundle(s) / APK(s) -> Build APK(s) then copy the apk from build -> output -> apk -> debug
and then you are good to go.
There is only one answer to this problem, Disable Instant Run. I also faced the same issue and resolved by disabling instant run. Below are steps to disable Instant Run on latest version of Android Studio(3.1.2):
Go to Android Studio Settings
Search Instant Run in search box in top left of Android Studio Setting Window OR Click on Build, Execution, Deployment
Here you will find Instant Run
By default it is Enabled, uncheck Enable Instant Run to hot swap code/resource changes on deploy(default enabled)
Click OK button at the bottom
Restart your Android Studio and try to install apk again
To know more about Instant Run, check official documentation: https://developer.android.com/studio/run/?utm_source=android-studio#instant-run
Here is one old YouTube video as well about this: https://www.youtube.com/watch?v=vuerGSylc9A
There are various issue which can leads to error “App not installed error” and to fix that we need to identify the reason for that. Read out the reasons written here.
Reason for “App not installed error” in android phone
Dimmer Application – Any dimmer app is running in your android phone then Install button will not work while installing app in your phone
Low storage – Android software and if data such as photos, videos, music, messages, Apps, contacts, emails, etc are stored in the internal memory there is not adequate storage left for another App, leading to Android App not installed error.
Corrupted App file – When you don’t download Apps from the Play Store and choose another platform to do that, Those App files are mostly corrupt and cannot installed on your device. I personally recommend you not to download apk from other sources / website
SD Card not mounted – When your phone is connected to your PC device which can access the SD Card from your device. In that situations if you install an App and choose to save it to your SD Card, you will see Android App not installed error because the App cannot find the SD card as it is not mounted in your device.
App compatibility with Android Version – Some applications on the internet which are only meant to work on some Android versions. Installing these applications on newer android versions will show error.
Application Permission – Application running in the background and App Permission are not new concepts. Such errors can also cause the Unknown Error Code during App installation.
Incorrect file – If you already have an App installed but download another variant with distinct signed or unsigned certificate can also show an error.
Methods to Fix App Not Installed Error | App not installed error solution
Method 1: Allow Apps from Unknown Sources
In android phone to install app which is not downloaded from Playstore you need to tick Install app from unknown source. By default this option is untick fro safety purpose, so if this is untick you will not be also to install app in android phone and will give you Application not installed in android smartphone. So to fix this follow the below path.
Go to Settings → Security → Unknown Sources. Enable Unknown Sources.
Now try to install App.
Method 2: Clear Data and Cache of Package Installer
Firstly Open setting of your Android device.
Tap on the option called Apps or Manage apps
Check for the Package Installer App under system Apps
You will find two option of Clear data and Clear cache. (Android Marshmallow 6.0 users check for option Storage to clear data and cache)
Clear the data and cache and you problem is solved.
Please try to cleaning your project and then check it. If it will not solved still then try to free some space from your device, because this error may occur due to lake of space in device memory. Please check with these both ways.
May be Only Disabling the instant run is the right solution. Uninstalling android studio or creating new virtual device will not solve the problem.
Setting--> expand (Build,Execution,deployment) ----> Instant Run (Please Uncheck the Enable Instant run to hot swap code option )
You might need to enable running app from unknown sources in phone.
There are different ways to turn it ON depend on the mobile manufacturer.
To allow app installs follow this steps in Android device:
Navigate to Setting > Security.
Check the option "Unknown sources".
Tap OK on the prompt message then Select "Trust".
Also in few devices, once you run your code you need to provide run time permission to allow running the App. Just Click on Allow in dialog, it will work.
This Error occur main reason is Instant run.
When you will using instant run only the updated part gets replaced on device.
Some times the application seems to not updating and it is staying at
previous build.
Solution:
You have to disable Instant Run to generate the whole APK file is updated on device.
In Android Studio:
File -> Settings > Build, Execution, Deployment > Instant Run:
Uncheck : (Enable Instant Run to hot swap code....) > Apply.
Thanks.
Android studio change the concept of Building APK
Go to Build section in android studio,
Build apk
now install this apk
When I install my application in debugging mode on my Android mobile device, it seems to be installed.
However, after signing the application and publishing it, it's not installed on my phone. (Release mode)
It says: Application not installed.
I tried a few things but cannot resolve this problem. I also tested with another Keystore but it still cannot be installed.
I verified Xamarin Studio options but everything is OK, does anyone have an idea?
The correct process of creating apk is given below
First change your build type to Release from debug.
Clean
Rebuild
Right click your android project and click on archive
After successful archive click on Distribute and click on Ad-hoc
Create keystore file
After finishing click on Open Distribution
Your apk file is ready.
I know I am late in party. But I believe it could help someone to resolve his issue.
Sometimes the issue is unsupported Architecture.
You can resolve it by
Android Project>Properties>Android Options> Advance>Supported Architecture.
Here you can check the supported architecture according to your device and the issue would be resolved. (I believe app should support maximum of architectures so check them all).
Hope it would help.
For OS X and windows the commands are same:
For windows please download: MSBuild Command Prompt for VS2015
For release version (the actual problem you are facing): type in command tool:
msbuild /p:Configuration=Release Path\To\Your\ApplicationProject.csproj
If this doesn't explain your problem I would post directly on their forums or contact their support. That could also help if you could find the installation log, there is probably an explanation why it fails to install.
I found the solution here https://forums.xamarin.com/discussion/comment/72399/#Comment_72399.
The answer from Felix Alcala works perfect. No more "App not installed" messages on device.
Open the SDK Locations in Xamarin Studio
Preferences/Projects/SDK Locations/Android
and set Java SDK(JDK) to
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Finally, generate the .apk file again.
Check the target sdk when debug and check version of your android device.
Version of android device should be equal or greater than the target sdk in debugging mode.
You may encounter this issue if you have installed then uninstalled the same app from your phone.
In Visual Studio, go to
Tools > Android > Android Adb Command Prompt
Ensure your phone is connected and debugging is enabled on your phone. If this is done properly, the name of your phone should show in Visual Studio next to the run button.
In the adb command prompt, enter this command:
adb uninstall [your package name]
E.g.
adb uninstall com.mypackage
You should then be able to install your APK
This also happened to me, after downloading the .apk from my android device browser and pressing the Install button, it said "App not installed" with no further information. After downloading it several times, (each time getting the same issue) I finally got the message that I could not download de .apk because I did not have enough storage in my device. So, check if you have enough storage in your phone before trying to install it, as the error message is only "App not installed" instead of warning that there is not enough space.
Google Play scans the device for threats before installing anything from unknown source. When you try to install for the first time, it will ask if you want to install, if you let it install it'll work fine. But second time, even if it asks or not, it won't let you install. One solution for this is, go to your play store, under Play Protect disable ' scan device for security threats' and then install it, it should work! One other reason for the error could be that app is already installed in your device, uninstall the app or change the signature and then try to install it, It should work! If these don't work, try to debug through usb, adb would show you the error and then you can work on that!