androidandroid-studioandroid-gradle-pluginsigningandroid-signing

Testing release builds on android without signing


I'm attempting to do some performance analysis on android/JNI.

How do I generate a release build for testing?

I know it's possible, as I've successfully produced a binary and executed it with no signing whatsoever via an Android.mk file, but I'm trying to move to android studio, and it won't let me generate a test-build. Entering garbage in the key fields doesn't seem to work

This is just a test-project to validate I can get the performance I need. It'll never be distributed, or run on any device other then the one on my desk.

Can I just turn all the code verification off entirely? I'm doing validation now, and the end-use of this project is a non-internet-connected device which is intended to be treated as a black-box appliance.


Solution

  • Ok, as far as I can tell, it's impossible to disable the forced requirement, presumably because someone at google makes truly horrible design decisions.

    You can, however, just use the debug keystore:

    signingConfigs {
        garbage_key {
            keyAlias 'androiddebugkey'
            keyPassword 'android'
            storeFile file('C:/Users/<your_user>/.android/debug.keystore')
            storePassword 'android'
        }
    }
    

    Back to trying to get gradle to do anything sensible. This is by far the worst build disaster I've ever worked with.