I'm using Visual Studio mac for developing Xamarin, recently I released my Android app but a rare behave happened! Releasing app popped out 2 files named app.apk and app-Signed.apk and I think the 2nd one should be the one I should upload to Google Play store (am I right?), but after opening it on my device I found out many changes that was appearing in debug app are not exist in Singned one! while app.apk is OK with changes I applied to app.
Is app.apk in debug mode?
What should be app-Signed.apk and why it has this problem and how can I fix it (if answer to #1 is true)?
Sometimes Visual Studio Mac for some reason does that. Remove obj and bin folder from a project directory, and then build again. If that happens again (2 files) the odd thing that you need to upload to google play non signed one.
Related
a couple months ago I reinstalled my OS (Linux Mint). I put the files into another partition and then copied them back. After that, my apps didn’t install properly anymore. I had to uninstall and then reinstall my app. I used an APK, not the Play Store. I want to switch my OS again, but I don’t want to break my app, so can anyone explain what happened and how to prevent it?
Thanks
The solution is to save the debug key, which can be found like described in this question: Where is debug.keystore in Android Studio. After the installation of the Android SDK on the new OS, replace the debug key with your old one. The key is not in you project files, that's why it isn't enough to copy the project files.
On long term, one should add a release key to the app to reduce confusion.
This may seem like a duplicate question, as there are 4 or 5 other exact questions. But I have tried the solutions to every other question like this with no luck.
Basically, I've been successfully generating signed APKs for weeks now, but out of the blue 3 days ago the signed APK is not being generated. Simply nothing gets generated, even though Android Studio says that it has successfully generated it.
I am using Android Studio 3.0.
I have tried totally uninstalling/reinstalling AS, I've made sure that both APK option checkboxes are checked during the signed APK generation dialog window.
I have many times restarted Android Studio and my computer, as well as cleaning/rebuilding many times. I do not know what to do from here.
I really need to get an update of my app out to Google Play but I cannot generate the new APK.
The apk is probably being generated but not on the path you expect. Look around the project subdirectories or search for apk using your operating system search tools.
I too faced the same issue, what you need to do is after migrating a project to Android studio 3.0, delete the already generated signed apk in path /project/app and generate the signed apk again, you will see a release folder in the same directory.
Have these erro when i'm trying to build the apk to some devices. Have no idea whats going on.
I get that when i build and install apk on device at the first time.
Someone have some tips for that?
[[EDIT]]
Well, after creating a debug key on keystore, i can build and deploy the apk via ADP to the device. But, dont know why, the error just return...
And now, we have other error:
UPDATE:
I Fix that issue removing all Android SDK and Android Studio and ReInstall it.
The problem can be solved by addding the install flags -r -t in the Run/Debug Configuration Dialog like it's showed in the given image
You can find Run/Debug Configuration Dialog location here according to Jetbrains.
UPDATE: Depending on the Android Studio version the Run/Debug Configuration position in the IDE can be slightly different, but always refer Jetbrains to find whatever you are looking for
When you've installed an APK from another source, Android Studio warns you before overwriting.
For example, if I've developed an application, uploaded it onto the Google Play Store, downloaded it, then try to re-deploy that same application from Android Studio, I'll get this warning.
It's trying to tell you that the way the package is signed is different; it's warning you that another app might be masquerading as the original.
The reason is you are trying to install the application with the same package name.
If you have already downloaded the same application from the play store /app market, then simply uninstall that application and RE-RUN.
This error can also occur if you recently switched branch which had different build variants declared in build.gradle file and you didn't perform gradle sync.
For example you had release and debug and then you switched to branch which has releas, deubg and staging variants; your project will still build but while installing apk this error can pop up.
I am attempting to run my app in an emulator and have been receiving the following error:
Installation failed since the APK was either not signed, or signed incorrectly.
If this is a Gradle-based project, then make sure the signing configuration is specified in the Gradle build script.
I am attempting to run the app with a debug setting so signing the app should not be necessary as it will be given a temporary signature upon building.
This happens often when you install the same app generated on a different computer. Even the unsigned apk has a signature, so your phone is confused why you're trying to install something with the same package name that was generated on a different computer.
Go to your settings -> apps, then find the app in the list, and clear its data and uninstall it.
Then try installing again. That'll fix it.
This problem can be resolved by below two ways
Change Built Variant to debug
Define your application`s signingConfigs
First solution works when you built your application in debug mode. But, once you are ready to publish your application on Google Play store you need to go by second way.
Read for more -> Sign Your App
Hope this will help one and all!
I had this same problem occur last night. Running in debug, in my case the app had previously been installed from weeks ago, and I had deleted it, but I was still getting the error and couldn't install it again. I was able to resolve it by going into the AVD manager and wiping user data from there. After that installation and debugging went fine.
There may be already install current app with certificate
uninstall it and try again
I solved it more or less following the answer of Alex K above, but did not know where to look for 'settings' (total beginner!).
So go to the AVD manager (icon of mobile in toolbar) and click on the arrow on the far right, a small menu appears and here you select 'Wipe Data'.
You do need to first close the emulator.
What I tried:
Clean Project and Build again
Invalidate cache (File -> Invalidate Caches/Restart ...)
Reinstalled Debug certificate in case it expired
Cleared Gradle cache
Add signing process to Gradle
Went to settings -> apps in the Emulator and deleted previous versions (as explained in this thread)
Wiping Emulator data through AVD interface
Upgraded gradle version
None of those solved the issue.
In the end I executed the compilation/signing steps manually until I found the culprid: One of the file in my asset folder was 'Icon?' generated by MacOSX
In order to detect it I followed the instructions here to Build an unsigned APK and sign it manually:
https://developer.android.com/studio/publish/app-signing#sign-manually
When I ran step 3 (apksigner) I got an exception with message cannot sign apk because of file ..\folder\folder\Icon?
I understand that what was happening is that Android Studio did not capture the exception and tried to deploy the unsigned application onto the emulator.
Once I removed the file and tried again I no longer had the issue.
(quite a pain to find the root cause...)
So, step 1:
Run the standard check (clear cache..)
IF you have a MacOSX, check if one or multiple of your file is 'Icon?'
Step 2 - run the steps manually
If you still get this error in debug mode, follow these steps:
Clean your project
Run it again
This works for me on Android 2.2 Beta.
I'm developing an android app using Eclipse. I export the app using the Export Android App function. I sign and align the resulting apk file. I then copy this apk to a webserver and try to install it on my phone. It goes though the installation steps, and when I test the app it does not contain my latest changes. It seems to install one of my previous builds.
Is the problem in:
- the way I create the apk?
- a cache on the phone that has not been cleared?
How do I get Eclispe to make a current apk, and how do I get my phone to install it?
How can I verify which version of my code is in a particular apk file?
Thanks,
Gerry
It could be that Eclipse isn't building the new .apk properly, though it sounds like you're exporting correctly. Are you giving the new .apk a different name from the old one? If not, then you could be downloading or installing the old one by accident.
You should be able to go into Settings -> Applications -> Manage Applications on your phone, then find your app and open its info page. The version string should be listed near the top, so you can verify that the latest version is installed.
Try running "adb logcat | tee logfile" (or adb logcat > logfile) before you begin the install attempt, then ctrl-C it and go over the file with a fine tooth comb - there's likely some hints of the problem buried within the noise.