I renamed the project successfully but now there seems to be having two .apk files. Do I have to keep the old .apk? . Currently my new .apk file has no errors. Will it corrupt later?. Or if I remove it will my project be still fine forever? I have a long term usage idea for this project so what is best to do.
But keeping the old name.apk is like keeping garbage I need a clean project... What can I do? And how this affects when I need to sell application in Android market.
Delete the old .apk file, it only because you rename your project, so it generates a different file.
Google Play (Android Market) will see it as a new app if you change the package name.
If you haven't already uploaded the original version, yes, you can just delete your local .apk.
delete bin and gen folder to clean up with old built data.it will be built again automatically if you have checked true in front of Build automatically option in Project tab.
Related
I am working for a React-Native project and using MAC.
I have accidentally deleted .android folder. Then I completely deleted Android Studio and installed once again. Now, .android folder is created automatically, But still some content seems missing like keystore files. Due to to this I am unable to create Signed Bundles.
Is there any way to have keystore files inside .android folder?
By the way I have a copy of keystore files inside <root>/android/app/ location.
.android folder is auto-generated. That means that you should not store anything that is not autogenerated in it(especially keystore files). It should not be subjected to version control also.
The official and correct way to have it as you want - is to have a separate not autogenerated android folder that can be put under version control. I can see that you have it like that already which is good.
To build your signed bundles and apk files you should set up a correct path to your keystore(from /android/app/) in your build.gradle file in the signing config section - here is the official info about how to do it.
About how to restore .android content - if you had no version control there or any other snapshot - you cannot restore it. You can tweak its content a bit via the general project/ide settings but that is it.
I'm no expert but.
It seems that it didn't uninstall the software entirely.
Try
Updating the Android Studio
Or Reinstall it again
Or Install the Nightly Build/Developer Release I reckon that there is no builds for mac.
I made my android project and run the app on my phone. I got the apk file and also app but accidentally deleted app. Can anyone Help me out please.
If your apk not obfuscated by proguard or other third party also not build by signed. Probably you can use an software like Dex2Jar. But i am not really sure about this, you can try it. There are tutorial here
Reverse engineering your app is theoretically possible but hard.
1) Use the Apktool which would help generate a little code and the resource files.
2) Use the jadx tool which helps to produce Java source code from Android Dex and Apk files.
Next is to open a new Android Studio project, copy the manifest file generated by the Apktool into the manifest of the new project, Copy the resource files generated by Apktool to the res section of your new project, Copy the java files generated by jadx and place them in the src folder of your new project.
Try to build the app but you'll definitely run into several errors. Try following the messages to fix them.
Reverse engineering your app is very tedious and you still might not be able to build the app.
Goodluck :)
Added 24th November 2019
Just found this awesome article on how to go about Reverse Engineering an Apk.
I'm re taking some old app that has been in the Play Store for more than 5 years. However now that all my code is migrated to AST, everything is working and I'm ready to make a new update, I've come to realize that the key for signing the app has a diferent extension name. Now Android Studio ask for a file .jks but my old app used to use a .key file. I haven't find anything online.
The same file will work for Android Studio
for anyone possibly still struggling with this topic-
You may have forgotten the .jks file of that project.
Search for .jks files in File explorer.
Connect it to your project.
I'm running Android Studio 0.5.8 and using the "Debug App" functionality to send my work in progress to my phone to test. I've done this dozens, maybe hundreds of times. I'm concerned that Android Studio may not be overwriting the old apk files. It appears that my useable space keeps dropping.
Where does Android Studio save apks when installing debug runs?
Is it a destructive or cumulative process? Do I need to clean out the folder manually?
Within your module directory should be a folder called build, then another directory called APK. The APK should be in there. Perhaps check the file size and compare it to your "drop in space"
On your device Chris Stratton's comment is correct, it will overwrite the old APK when installing.
Check Settings->Apps and select your app. The see what readings it gives you for Data and cache.
It is stored in /data/local/tmp. It should overwrite the old apks stored there.
I have signed the application using Eclipse's Export Wizard. When I published this, users started complaining that the application is behaving incorrectly. (Basically, the APK did not have necessary images & audio and hence showing incorrect behaviour).
Some information on Application and Signing which I have tried.
I have a lite version and paid version. Both are signed with same keypair. The lite version is working perfectly and full version is giving error.
I have tried to export the signed packages again and tried to install directly in device (instead of uploading to market). Same behaviour (i.e Lite apps works correctly and full version not proper)
Both Full Version and Lite Version uses shared Library (Code base is identical. Differences as follows.
Full Version has 5 times the resources of lite version. The lite version apk is ~2.6MB and full version is ~10.4MB. In Full Version I have 170 images (mostly png's of 5-10 KB) and ~55mp3 files. In Lite Version I have 45 images and 15 mp3s
Full Version has LVL (License Verification) implemented and Lite Version doesnot. Once LVL is passed, the code simply calls the Library Class
If I use Eclipse to build and deploy full version to phone (or emulator), it works correctly. (I guess this build and deploy will use debug key for signing)
I have error handling within the code to show code to show a dummypic (a question mark) if resource is missing. All my images are replaced with that question mark. Just to add.. This dummypic is in the Library and all other resources(images) are in Full Version.
I have checked the resources by renaming the signed apk file to .zip (thanks to NickT for suggesting this approach). All resource files (audio and images) are present in the zip file.
Any help is appreciated. The application is already in market and hence would like to minimise adverse impact.
Removed LVL. Still same error
Tried commenting the LVL code and directly calling the intent. Still same error.
By commenting the LVL, the code base for Lite and Full Version is identical. Only the resouce count is different. The full version has all the resources of Lite Version + ~5times the resource.
Update
This is how I temporarily fixed it.
I removed the library project and moved all classes and resources to the Implementation Project (Full Version). Now it is working.
As said, this is a temp fix only. I still need to know how I can fix this with library. Else I will have to create a lot of duplication of code.
My bet would be that it has to do with permissions.
The app that is being installed first, will have read-write permissions to that folder, the other will not.
Try using a ContentProvider to make your images accesible for both apps!
The sign shouldn't affect your code. I think the problem must be in the source code of Paid version.
Do you test in emulator? from eclipse? You can test the signed apk in emulator too through "adb install application-signed.apk".
I think you should uninstall and then re-install app, it happens sometimes, when your phone already has the application and you install it again with different resources and files without uninstalling(but overriding), it gives odd behavior,
try uninstall and then re-install should work for you.
I am not sure but i think no two apps of the same package name can co exist in a single device. try installing the apps in two different devices.
Two suggestions:
1) Do you have proguard enabled? If yes, try disabling it and test. If it works, you might need to update your proguard.cfg (probably with some -keep public class)
2) Delete your R.java manually and recompile your full version only!
I encountered this problem with Android projects using other Android Library projects. It looks like the AAPT (or an eclipse ADT part) sometimes fails when creating the R-file ids (So the resources are present, but the id's are not correct).
What quickly fixed the issue for me: Close the "master" project and reopen it having the Build Automatically option set or make a clean&rebuild on this project. The next exported APK shouldn't have the resources-not-found issue.
Maybe you let a debug flag into the Manifest file ?