I would like to see the output folder itself directly in the android studio IDE.
To be clear i want the apk output folder to show up in my IDE so i can see apks as they are built. The folder from the OS explorer shows the apk in Foo/*/build/outputs/apk/ .
However, i want this same folder to appear in the IDE. Is it possible ? This way after a build it would be easier to get the apk and its also a good indicator when the build process is complete.
Here is what the IDE UI currently looks like, notice how its missing any output folder:
Related
I'm new to Android Studio and I would like to know the difference between the APK generated using Build -> Build APK(s) and the one using the 'play' button (Ctrl+F5).
The problem is the following: I'm using some native libraries and when debugging with Ctrl+F5 (the play button) I get an UnsatisfiedLinkError because the library is not found. Indeed if I open the APK (Build ->Analyze APK) I see there is no 'lib' folder so no .so lib.
However when I Build -> Build APK(s) and then analyze this new APK I can see the 'lib' folder with all the .so libs. Then if I copy this APK inside my phone and install the app, everything works fine (I use Native Libs Monitor and it recognizes the native libs inside).
Of course I cannot do this everytime so I'm looking for the differences so that I can understand why the libs are not created inside the apk in the fist case.
The simple explanation is that the build .apk makes your project generate all the code into one file (.apk) and then it can be opened and installed on Android.
If run which is like the 'play button' runs your project without you needing to install the .apk file first and of course this makes it easier for you as a developer.
if there is an error problem, you should attach the error message to your question and it is better if you attach it in the form of a screenshot.
So far after much investigation, I got as far as finding Tools->Archive Manager in Visual Studio 2017; however, I have no idea where to put archives to be viewed in this manager.
Other than Current Solution there is an All Archives menu on the left side, which looks like a Global repository, but I cannot seems to add anything to it.
Drag-n-drop does nothing either. I even tried creating a new Android project and dropping the .apk files into the bin folder and still nothing, so I'm at a loss.
Is it not possible to open 3rd-party APK files in Visual Studio (the ones I have are unsigned) in order to sign and test it in the emulator?
I am trying to run an Android project in excess of 100 megabytes.
It works fine when I build a simple oversized APK file, but that's not legal for the Play store.
So I am Exporting it from Unity with the 'Split Application Binary' box ticked, then importing it into Android Studio, then building the APK file there (due to gradle version issues in Unity).
When I install and run it, I am able to detect the existence of the OBB file (using the GooglePlayDownloader.GetMainOBBPath sample code) but when I try to load any of the files that should be in it (using, for example, UnityEngine.Resources.Load), it returns NULL.
I have made a mini project to test OBB files, using the same basic build process, and it works there. I don't know what the difference is. (The real project is far larger and contains a lot of Unity plugins, which I've been testing on the mini project to see if any of them break it - so far, no luck. I have custom gradle and AndroidManifest files to make these plugins work together, which they do in non-split tests.)
Is it possible from Unity code to look at the OBB file and see what's in there, or otherwise confirm the integrity/compatibility of the file, or get a more useful error message from the Android Studio Logcat window?
Note that I'm not currently looking for help downloading OBB files - it seems to work - at least in my mini-project - when I copy in the OBB file as a main.(bundle version code).(package name).obb into the Android/Obb/(package name) subdirectory.
Update:
Apparently you can see the contents of an OBB file just be renaming it to a .ZIP file or similar.
My specific problem seems to be that the "unity.build-id" in my AndroidManifest.xml file did not match the name of the 0K file in the Assets folder in the OBB file.
I have a project i have worked on for a few weeks now. I went in to optimize some png's and was able to take a few mb's off the file size. However, when i generate the apk its the exact same file size.
I remember in eclipse i could go into the gen folder to delete those images and it would then recognize the new ones. I tried to go into the build folder in studio and do that but it still produces an apk the same file size. Is there something im missing?
I have taken one of the optimized images out of the produced apk and compared to the old and its the same size so its not picking up the new one for whatever reason.
Is there something else im supposed to do?
I know this is a very old thread but the answer to this question was never accepted.
So the problem here is in the emulator and not your computer or the software.
When you update the images the file names and paths stay the same. So it doesn't change the files on the emulator. I think it's just the way the android system works, if nothing changes then the app on the phone doesn't update.
So the solution is to simply uninstall the app from your emulator, then run the app from Android Studio.
Try rebuilding your app after refreshing the workspace, it works in eclipse but not sure about studio.
Go to Project->Clean. Uncheck "Start a build immediately". Go right click on your project and choose build. Then Run as - Android Application.
In IntellijIdea :
http://www.jetbrains.com/idea/webhelp/cleaning-system-cache.html
How to clean project cache in Intellij idea like Eclipse's clean?
For me it works to choose Build -> Rebuild Project on the main menu to do a full rebuild whenever I only change assets (i.e. when no source code has changed).
On top panel of xml designer there is Refresh Button.
I have an existing .APK file without any sources. I want to debug it with Eclipse on Bluestacks (or other) emulator. Eventually, I'd like to set a breakpoint, but for now, I just want to get it to run on the emulator. I'm not talking about just using adb to install it on the emulator and then run there. I've been unsuccessful in getting the resulting .apk, built by Eclipse, to run on the emulator.
Here are the steps I've done:
I renamed the .apk to .zip and unzip into a folder.
In Eclipse, I created a new "Android project from existing code". In the next screen, "Import Projects", I browsed to the folder where the apk was unzipped.
But this project has errors in Eclipse! So I tried the next steps:
I executed apktool on the .apk, and it created a folder which I use for the same import
mentioned in step 2. Now the project no longer has errors.
In Eclipse, I "run as" or "debug as" this project as an Android application, and it starts on the emulator.
No good! The logcat shows errors such as "dalvikv - thread exiting with uncaught exception". And there are other logcat messages about being unable to instantiate application and java.lang.ClassNotFoundException.
QUESTION 1:
Can someone tell me what other steps are necessary to turn this into a "good" project? Is there something obvious that I'm missing about Classes?
Once I can get it to either "run as" or "debug as" successfully, then I will want to debug it by setting a breakpoint. But I can't seem to get the source folder right. I have .smali files as a result of the apktool step mentioned in step 3. Also, I've tried various tools, such as dex2jar and jd-gui, so that I have .java files. But whenever I point tell Eclipse the folder where these sources are (and I have "search subfolders" checked), Eclipse says "Source not found". And "Edit Source Lookup Path". I also tried putting the
sources in the /src folder of the workspace.
QUESTION 2:
Where can I put the sources so that Eclipse will find them? Can these source files be either .smali or .java?
So basically what you are trying to do is to extract the source out of a packaged APK file. What you have achieved is the max i could do as well. There's no way to get the exact and true source code due to obfuscations whilst packaging an APK file. So what you have reached to is the max you can get to. I used these tools but never could extract a true .java file as the author may have written. It will contain some compiler addtitons and optimizations which are not understood by eclipse.
Question 1: You will have many step to get android project from .apk file. This work is named reversing, decoding...
You can use apktool to decompile apk to .smali files
Then use javaDecompiler for reversing .smali files to .java files
Create project and import .java files into it
Question 2: Try question 1 you can do it.
Notice: if developer who coded that apk use proguard, you only see follow of code.