简体   繁体   中英

JavaFX android app release disable debug

I've been trying to upload my first android JavaFX app to the Google Play Store but it says that debug is active and I can't continue with the upload. I've been using Eclipse with the Gluon plugin for JavaFXPorts and the "androidRelease" in the Gradle build options. Here's my build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b10'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
}

mainClassName = 'com.eg0.***'

jfxmobile {
    android {
        compileSdkVersion = 25
        manifest = 'src/android/AndroidManifest.xml'
        androidSdk = 'C:/Users/Eg0/AppData/Local/Android/Sdk'
        signingConfig {
            storeFile file('***.keystore')
            storePassword '***'
            keyAlias '***'
            keyPassword '***'
        }
    }
}

and here's my Manifest file:

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eg0" android:versionCode="1" android:versionName="1.0">
        <supports-screens android:xlargeScreens="true"/>
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="21"/>
        <application android:label="***" android:name="android.support.multidex.MultiDexApplication" android:icon="@mipmap/ic_launcher">
                <activity android:name="javafxports.android.FXActivity" android:label="Windows Mixer" android:configChanges="orientation|screenSize" android:screenOrientation="portrait">
                        <meta-data android:name="main.class" android:value="com.eg0.***"/>
                        <intent-filter>
                                <action android:name="android.intent.action.MAIN"/>
                                <category android:name="android.intent.category.LAUNCHER"/>
                        </intent-filter>
                </activity>
        </application>
</manifest>

I resolved by adding the android:debuggable="false" flag in the manifest file. Even if documentation says that if not specified, it's false by default. It also now gives me a warning saying "Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android ); using existing value in manifest.", but I guess that was the problem all along.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM