Distributing debug builds - ok?

After “run sketch in emulator”, the temporary build folder (named at beginning of build process) contains an apk in the app\build\outputs\apk\debug subdirectory. Is there any reason why developers who are not interested in signing up to the Google Play Store shouldn’t let users download that apk from their own web site? Are debug builds slower?

I was under the impression that debug builds only work on my computer, as per explanations on http://www.androiddocs.com/tools/publishing/app-signing.html: “You can run … on the emulator and on devices connected to your development manchine through USB, but you cannot distribute an app signed in debug mode”. However, the apk installs and runs fine on my non-connected tablet?! Is that because it’s running a rooted CyanogenMod?!

My understanding is that you can run this generated apk in any device. This is the way to share your app without going through the extra effort of publishing it. I believe Android mode generates three apk files (Not sure about the latest Processing Android version). I do not know the details as I never done this myself but I have read on the web that when you publish your app, one of the requirements is to disable debugging mode which I think it could be done via the manifest file. this means that your build version will be cleaner. An app with debug mode still enable would still work on any device and you might not notice much difference in performance in small or medium size apps. For larger apps, every optimization operation that you do counts.

From my experience, this apk file can be run in any device, rooted or not. The only thing is that you need to enable installation of apps from other sources, one of the settings in your mobile device that you can access through the settings menu, probably under device.

Kf

disable debugging mode which I think it could be done via the manifest file. this means that your build version will be cleaner.

Thanks for the hints. I tried adding android:debuggable=“false” to the <application android:icon=“@drawable/icon” …> line in the manifest. I don’t think that worked. Most messages during the build contained the word “debug” (like :app:generateDebugBuildConfig
) and the resulting apk has about the same size. Google then led to advice to edit the “build.gradle” file. There is a “build.gradle” file in the sketch (\android\app\build.gradle) and it looks like this:

android {
    ...       
    buildTypes {
        debug {
            debuggable true
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    ...
}

I made the debug block identical to the release block. However, during the build, these changes were discarded: The “app/build.gradle” file in the build’s temporary directory is automatically reset to the state before my editing.

Yes, I cannot add anymore to this post as I don’t have the experience. You can follow the instructions that you find in the Android Developers site under “releasing my app”. I am not sure how Processing Android manages the changes for gradle. I believe Processing honors the changes you do to the manifest, but not sure about gradle. If you export your app in the PDE, then you can open it in Android Studio and follow generic instructions to release your app following the sites I just mentioned.

Kf