Hbuilder離線打包

語言: CN / TW / HK

參考

https://nativesupport.dcloud.net.cn/AppDocs/usesdk/android

總結

直接匯入HBuilder-Integrate-AS工程

匯出MUI工程比並複製到以下

HBuilder-Integrate-AS\simpleDemo\src\main\assets\apps\appauthorize\www

三處名稱一致

dcloud_control.xml中的appid manifest.json中的id 資料夾名

生成自定義基座

dcloud_control.xml的hbuilder節點新增debug="true"和syncDebug="true"

修改schema

HBuilder-Integrate-AS\simpleDemo\src\main\AndroidManifest.xml

<activity
	android:name="io.dcloud.PandoraEntry"
	android:configChanges="orientation|keyboardHidden|keyboard|navigation"
	android:label="@string/app_name"
	android:launchMode="singleTask"
	android:hardwareAccelerated="true"
	android:theme="@style/TranslucentTheme"
	android:screenOrientation="user"
	android:windowSoftInputMode="adjustResize" >
	<intent-filter>
		<action android:name="android.intent.action.MAIN" />
		<category android:name="android.intent.category.LAUNCHER" />
		<action android:name="android.intent.action.VIEW" />
		<category android:name="android.intent.category.DEFAULT" />
		<category android:name="android.intent.category.BROWSABLE" />
		<data android:scheme="appauthorize" />
	</intent-filter>
</activity>
<activity
	android:name="io.dcloud.PandoraEntryActivity"
	android:launchMode="singleTask"
	android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard"
	android:hardwareAccelerated="true"
	android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"
	android:screenOrientation="user"
	android:theme="@style/DCloudTheme"
	android:windowSoftInputMode="adjustResize">
	<intent-filter tools:ignore="AppLinkUrlError">
		<action android:name="android.intent.action.VIEW" />
		<category android:name="android.intent.category.DEFAULT" />
		<category android:name="android.intent.category.BROWSABLE" />

	</intent-filter>
</activity>