cancel
Showing results for 
Search instead for 
Did you mean: 

Android:debuggable error when uploading new binary to ALPHA channel

stanleypenrose
Explorer
  I'm building my app with a UE4 4.11.2.  I've checked the app with the 0.1.7 version of the check_submission tool and it passes fine. But when I try to upload the .apk file, I get an APK Validation Failed, APK is debuggable (android:debuggable in AndroidManifest.xml).
   But I've checked the AndroidManifest.xml generated by the UnrealBuildTool and android:debuggable is set to "false". Here's the exact line from <project_directory>/Intermediate/Android/APK/AndroidManifest.xml: <activity android:name="com.epicgames.ue4.GameActivity" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="screenSize|orientation|keyboardHidden|keyboard" android:excludeFromRecents="true" android:launchMode="singleTask" android:screenOrientation="landscape" android:debuggable="false">

Here are the Android SDK settings in Project Settings:
C:/NVPACK/android-sdk-windows
C:/NVPACK/android-ndk-r10e
C:/NVPACK/apache-ant-1.8.2
C:/NVPACK/jdk1.7.0_71
android-19
android-19

I tried using android-ndk-r12b, but that just resulted in build errors. Do I need to use a new android-sdk/ndk?

Thanks,
-Stanley 
6 REPLIES 6

rosebud_the_sle
Expert Protege
Could you run "aapt dump badging <apk>" and see if that lists the actual packaged app as debuggable?  aapt is a tool that comes with the Android SDK.

stanleypenrose
Explorer
I don't know where the "application-debuggable" line is coming from. I looked in the AndroidManifest.xml and debuggable is set to false. And this apk passes the check_submission utility. 
Here's the output from running  "aapt dump badging <apk>"  (different language labels and locales cut out to save space) :  
package: name='com.PenroseStudios.ROSE' versionCode='11' versionName='0.2' platf
ormBuildVersionName='4.4.2-1456859'
install-location:'internalOnly'
application-label:'ROSE'
application-icon-120:'res/drawable-ldpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'
application-icon-240:'res/drawable-hdpi-v4/icon.png'
application-icon-320:'res/drawable-xhdpi-v4/icon.png'
application-icon-480:'res/drawable-xhdpi-v4/icon.png'
application: label='ROSE' icon='res/drawable-mdpi-v4/icon.png'
application-debuggable
sdkVersion:'19'
targetSdkVersion:'19'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='android.permission.READ_PHONE_STATE'
uses-permission: name='com.android.vending.CHECK_LICENSE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.MODIFY_AUDIO_SETTINGS'
uses-permission: name='android.permission.GET_ACCOUNTS'
uses-permission: name='android.permission.VIBRATE'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
feature-group: label=''
  uses-gl-es: '0x20000'
  uses-feature: name='android.hardware.usb.host'
  uses-feature: name='android.hardware.screen.landscape'
  uses-implied-feature: name='android.hardware.screen.landscape' reason='one or
more activities have specified a landscape orientation'
  uses-feature: name='android.hardware.touchscreen'
  uses-implied-feature: name='android.hardware.touchscreen' reason='default feat
ure for all apps'
  uses-feature: name='android.hardware.wifi'
  uses-implied-feature: name='android.hardware.wifi' reason='requested android.p
ermission.ACCESS_WIFI_STATE permission'
main
other-activities
other-receivers
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
densities: '120' '160' '240' '320' '480'
native-code: 'armeabi-v7a'

rosebud_the_sle
Expert Protege
OK, it seems like the manifest you are looking at generated by UnrealBuildTool doesn't match what Unreal is actually putting into the apk.  You could verify this by pulling the actual manifest out of the apk using apktool, but I think that this aapt result is evidence enough.  There's probably a build option in Unreal that is further mutating the manifest, but I'm not familiar enough with Unreal for Android to know where to look for that.  I'll poke around.

rosebud_the_sle
Expert Protege
Also, while we poke around, this is probably not a VR-specific issue so it makes sense to ask on at Unreal's AnswerHub: https://answers.unrealengine.com/index.html

stanleypenrose
Explorer
  Turns out it was a bug in UE4DeployAndroid.cs. android:debuggable=false should be in the application definition, not the activity definition. 

pieterdub
Explorer
I believe you have to use the checkbox called "For Distribution" to not have the debuggable setting.