注意 打包了才能看到效果
最主要是这个路径
/data/user/0/org.example.custom_splash/files/project
注意路径里面包名
splash.xml
<?xml version="1.0" encoding="UTF-8" ?>
<vertical>
<img w="*" h="0" layout_weight="1" src="file:data/user/0/org.example.custom_splash/files/project/123.jpg" scaleType="fitXY"/>
<frame gravity="center" height="180">
<horizontal gravity="center">
<img src="@mipmap/ic_launcher" w="80" h="80" scaleType="fitXY"/>
<text text="自定义启动图" w="auto" h="auto" textSize="24" textColor="#212121"
textStyle="bold" layout_gravity="center" margin="16"/>
</horizontal>
</frame>
</vertical>
project.json
{
"assets": [],
"build": {
"build_id": "035D3905-6",
"build_number": 6,
"build_time": 1647676173470,
"release": false
},
"encryptLevel": 0,
"useFeatures": [],
"launchConfig": {
"displaySplash": true,
"hideLogs": false,
"splashLayoutXml": "splash.xml",
"splashText": "Powered by Auto.js Pro",
"stableMode": false
},
"main": "main.js",
"name": "自定义启动图",
"optimization": {
"removeAccessibilityService": false,
"removeOpenCv": true,
"unusedResources": false
},
"packageName": "org.example.custom_splash",
"permissionConfig": {
"manifestPermissions": [
"android.permission.INTERNET",
"android.permission.ACCESS_NETWORK_STATE"
],
"requestListOnStartup": []
},
"scripts": {},
"versionCode": 1,
"versionName": "1.0.0"
}