How to build with PhoneGap [r250+] (alternative method)

  • If you are using version r250 or newer, and you are experiencing problems with compilation errors !?

    Simply use the previous config.xml settings.

    Here it is:

    <?xml version="1.0" encoding="UTF-8"?>
    <widget xmlns="http://www.w3.org/ns/widgets"
     xmlns:gap="http://phonegap.com/ns/1.0"
     xmlns:android = "http://schemas.android.com/apk/res/android"
     id="com.game.name" 
     version="1.0.0"
     versionCode="1"
     >
    
    	<name>Game name</name>
    	<description>Description game</description>
    	<author email="">Autor name</author>
    
    	<icon src="icon-128.png" width="128" height="128" />
    	<icon src="icon-256.png" width="256" height="256" gap:role="default" />
    
    	<preference name="permissions" value="none"/>
    	<preference name="android-targetSdkVersion" value="23" />
    
    	<feature name="http://api.phonegap.com/1.0/network"/>
    
    	<!-- Orientation - Landscape or Portrait ??? -->
    	<preference name="orientation" value="portrait" />
    	
    	<preference name="fullscreen" value="true" />
    	<gap:config-file platform="ios" parent="UIStatusBarHidden"><true/></gap:config-file>
    	<gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance"><false/></gap:config-file>
    
    	<preference name="deployment-target" value="8.0" />
    	<preference name="android-minSdkVersion" value="19" />
    	<plugin name="cordova-plugin-crosswalk-webview" source="npm" />
    	<plugin name="cordova-plugin-whitelist" source="npm" />
    	<access origin="*" />
    	<!--
    	Use only to compile for ARMV7 architecture
    	<plugin name="cordova-build-architecture" spec="https://github.com/MBuchalik/cordova-build-architecture.git#v1.0.1" source="git" />
    	
    	To compile for x86 add this command.
    	<preference name="buildArchitecture" value="x86" />
    	
    	Note: most of the times the phonegap compiles first on x86.
    	
    	-->
    	
    	<!-- ######## PLUGINS - Add the plugins used in your project ######## -->
    	
    	<plugin name="cordova-plugin-inappbrowser" source="npm" />
    	<plugin name="https://github.com/cranberrygame/cordova-plugin-ad-admob" source="npm" />
    
    </widget>[/code:3dvyw9ar]
    
    Do not forget to change to the information of your game.
    
    [b]Android - APK[/b]
    Only for Armv7 architectures add the command below:
    <plugin name="cordova-build-architecture" spec="https://github.com/MBuchalik/cordova-build-architecture.git#v1.0.1" source="git" />
    
    ** Most of the time, Phonegap generates Apk for x86.
    
    [b]Version code:[/b]
    Change the value of the version code each time it is compiled and sent to the Play store / App Store.
    
    Exemple:
    Game v1.0.0
     versionCode="1"
    Game v1.0.5
     versionCode="2"
    
    [b]Orientation - landscape or portrait ???[/b]
    <preference name="orientation" value="?????" />
    
    How to build the APK?
    Put all files together, compress them in .zip format
    Send to compiler.
    [url]https://build.phonegap.com/people/sign_in[/url]
    
    Success!
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)