Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I want to be able to run my Application in "Release Mode" in Eclipse so that I can enable ProGuard, but I do not know the steps required in order to do so.
I have tried the information at: http://developer.android.com/tools/publishing/preparing.html, but I find it quite overwhelming.
Can someone outline the required steps, or provide a link to a simple step by step tutorial?
EDIT: please note that I do not actually wish to release this app on the Play Store, it is just to test if I am correctly enabling ProGuard.
Enable Proguard
Uncomment the line in project.properties there's a comment that makes it clear which one.
Building
As you're using eclipse, I recommend using ant as detailed here: http://developer.android.com/tools/building/building-cmdline.html#ReleaseMode
There is a one time step of:
cd projectPath
android update project -p .
That creates the build.xml for ant. You will need to repeat for sub projects.
Open or create ant.properties and put this in:
key.store=path/to/my.keystore
key.alias=mykeystore
To generate this keystore see http://developer.android.com/tools/publishing/app-signing.html
Then at any time to create a build do:
cd projectPath
ant release
This will create a signed, aligned and proguarded apk.
At first,you must know the functionality of proguard and how to export your application in eclipse ide as a .apk file.Note the below link for your reference.Here,the process explained briefly.
How to obfuscate my android project in eclipse IDE?
http://developer.android.com/tools/help/proguard.html
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I need to generate a signed APK without Android Studio. Is there a way like a .exe program, a command in the cmd or a online service to do this?
I've to edit a JSON file inside the resource folder of the project and build the APK that I have to load on my device and I can't use Android Studio every time.
I can't use ionic, cordova or phonegap.
You can execute all the build tasks available to your Android project using the Gradle wrapper command line tool. It's available as a batch file for Windows (gradlew.bat) and a shell script for Linux and Mac (gradlew.sh), and it's accessible from the root of each project you create with Android Studio.
Find more here : https://developer.android.com/studio/build/building-cmdline
Check out the official docs - Build your app from the commandline.
You can use gradle commands depending on which variant you want. For example, ./gradlew installDebug will make a debug apk and load it onto a connected device (though it won't open it like Android Studio does). gradlew is the Gradle wrapper file present in the root of the project.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
My company gave me a 4 year old Android Project that I have to fix. I've been used to working with IntelliJ and Android Studio for a while now. At first sight I saw this was an eclipse project and I've tried numerous things to get this to work on Android Studio, more specifically like the following.
I'm also trying to integrate Gradle in this project. But even after trial and error I do not get the expected result that I normally get with my own projects, note the arrows I usually get with my other projects. Now it looks totally different.
Any help or tips on how to get this old project back on its feet is highly appreciated.
This could help you a lot:
Migrating from Eclipse ADT
Another critical thing is that if you are a keyboard-oriented programmer, it will take some time to get used to Android Studio's shortcuts. Even though it has some eclipse shortcut support.
Which can be easily found in here:
Eclipse Shortcuts
Good luck.
You can follow the following steps, no need to export the projcet as Gradle, Android Studio (AS) provides this by default,
Go to File menu and select New -> Import Project
next from the File browser select your Eclipse Project folder,
click Next in the subsequent steps and lastly Finish to successfully import the project
There may be some dependncies of your project but you can read the instructions provided by the Android Studio import dialogs and handle them,
ask further if you need help.
In the worst case scenario, you can always make a project by the same name, copy the sources (and resources) into their corresponding package, move the relevant stuff from the old AndroidManifest to the new, and add the external dependencies (such as that Google Play Lib for example) through Gradle itself.
If the project uses NDK, then you're gonna have a bad time though, because that requires setting up the Gradle experimental branch.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am a beginner to Android NDK with Android Studio. While trying to grasp the ideas through tutorials I got my self very confused. Mainly I am confused about the building method of native project.
For example while following this tutorial, when I build the project there is no file created inside libs project. Moreover, there is no need of Android.mk and Application.mk make files also.
However, second tutorial deals with the make file.
Can anyone please explain to me step by step explanation of build steps. I am not sure how hard it is for Android team to make a simple tutorial explanation one version of built.
Not sure, if by the time of this writing (2016/02/01 - Android Studio 2.0 Preview 9) NDK is officially supported yet, but it's surely been under development. That's the reason of using Eclipse+ADT+NDK in the official guide as you can see in the Setup section. I believe, once the process is done, the documentation will be updated.
You're free to choose which approach to use:
Eclipse+ADT+NDK or
Android Studio + Gradle + NDK
With the second approach Gradle generates *.mk files automatically, although you can use your own files by preventing the auto-generation as per The new NDK support in Android Studio by ph0b.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
today I've updated my Eclipse (Win7 x86_64) with latest android updates and it caused some errors. First of all, after cleaning project Eclipse didn't generate R files. I've tried to find any possible error in my xml files, although - there was none. I've copied my project and opened it with Eclipse without latest updates on Arch Linux - Eclipse generated R file and everything was OK. I think that's also important to mention, that after updating Eclipse on Windows the new code, that I've written didn't work - worked perfectly on Linux's instance. I've copied all R files and folders to Windows, yet couldn't run app, because my apk was missing and after that I've just gave up.
Anyone had similar problems or is there any possible solution?
i had experienced the same. For the new SDK(ver 22.0.1), we need to install a new tool Android SDK Build Tools.
After that, update the eclipse ADT.
Restart the eclipse.
Then clean and run the project.
I had a similar experience some versions back. The work-around I found was to setup an entirely new and separate IDE instance including a different SDK folder location. Install from scratch! Good luck ...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want a command line tool that works in the following situation:
1) A computer with JDK and Android SDK installed (with the target Android platform).
2) An Android project created using eclipse.
And give me the following output:
1) The signed APK of the given eclipse Android project.
How do I accomplish the above by writing a Java program (By kicking off Ant using the Java Runtime class)? I want to automate the build process, how do I do that?
Thanks.
I've used ant to do this and we use Jenkins for Continuous Integration. I've written a post on how to automate this.
http://www.multunus.com/2011/09/continuous-delivery-for-android-apps-part-1/
I use Maven with the Android plugin. It works well.
See http://simpligility.github.io/android-maven-plugin/.
The Android build process is fairly complex: quite a few tools are invoked one after another: javac to compile, then dx to convert to dex, then aapt to package (I'm sure missing a few). You can run Ant in debug mode to see the exact sequence (it is also documented, somewhere...).
So you can either:
Bundle the Ant jars with your app and invoke Ant programatically
Write a Java 'script' that invokes the tools in the correct order
Write a simple shell script/batch file and be done with it.
I am currently using Fastlane to automate beta and production releases. Fastlane is largely written in Ruby and you can customize releases based on your internal processes. You can watch this Droidcon '16 video to get started.