uni-app Client platform is app, but app-plus was found in config.

uni-app Client platform is app, but app-plus was found in config.

操作步骤:

3.4.12 -alpha更新到最新版,就报这个错,加了配置也没用

预期结果:

正常

实际结果:

Client platform is app, but app-plus was found in config. Please refer to: https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=prefered-app-platform

bug描述:

3.4.12 -alpha更新到最新版,就报这个错,加了配置也没用
Client platform is app, but app-plus was found in config. Please refer to: https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=prefered-app-platform

12 回复

没看明白是在manifest.json里面加吗

回复 深蓝的一片海: uni-id的config配置文件里添加,详见

我也遇到了同样的问题.目前没有解决. 我的场景是 新建了一个uni-admin项目,然后将这个项目通过本地android打包成apk.然后apk在android平板上安装.
目前我在 uni_modules\uni-config-center\uniCloud\cloudfunctions\common\uni-config-center\uni-id\config.json 中添加了 配置项: “preferedAppPlatform”: “app”
部分配置项如下: “passwordSecret”: “passwordSecret-demo”,
“tokenSecret”: “tokenSecret-demo”,
“tokenExpiresIn”: 7200,
“tokenExpiresThreshold”: 600,
“passwordErrorLimit”: 6,
“bindTokenToDevice”: false,
“passwordErrorRetryTime”: 3600,
“autoSetInviteCode”: false,
“forceInviteCode”: false,
“preferedAppPlatform”: “app”,
“app”: {
“tokenExpiresIn”: 2592000,
“oauth”: {
“weixin”: {
“appid”: “填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appid”,
“appsecret”: “填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appsecret”
},
“apple”: {
“bundleId”: “苹果开发者后台获取的bundleId”
}
}
}, 在登录之后任然提示: [uni-id-cf]::Client platform is app, but app-plus was found in config. Please refer to : https://****
我的Hbuilder X版本: 3.4.14.20220607

uni-id是哪个版本?请更新到最新版本,并重新上传uni-id公共模块,更新依赖本模块的云函数试下

回复 DCloud_UNI_Anne: 感谢回复.uni-id升级到最新版后,问题解决

不必更新uni-id。在uni-id的config配置文件里添加好,重新上传uni-config-center公共模块即可。

提示就是在谎报军情,搞了一天才发现升级uni-id就好了

注意需要配置才可以,你说的升级uni-id就好了,大概率是你测试不到位

uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json 这个文件里面把app-plug改成app就可以了。

In uni-app, the app platform is used to target native mobile applications (iOS and Android), while app-plus is an older or less commonly used term that generally refers to the same thing. However, if you encounter a configuration issue where app-plus is found instead of app, it might be due to outdated configurations or misunderstandings in the project setup.

Here’s how you can resolve this issue:


1. Check manifest.json

  • Open the manifest.json file in your project.
  • Ensure that the app platform is correctly configured. For example:
    {
      "app": {
        "id": "com.example.app",
        "name": "MyApp"
      }
    }
  • If you see app-plus in the configuration, replace it with app.

2. Check pages.json

  • Open the pages.json file.
  • Ensure that the platform-specific configurations use app instead of app-plus. For example:
    {
      "pages": [
        {
          "path": "pages/index/index",
          "style": {
            "navigationBarTitleText": "Home"
          }
        }
      ],
      "app": {
        "navigationBar": {
          "backgroundColor": "#ffffff"
        }
      }
    }

3. Check package.json

  • Open the package.json file.
  • Ensure that the uni-app dependencies and configurations are up to date. For example:
    {
      "dependencies": {
        "uni-app": "^2.0.0"
      }
    }

4. Update Uni-App CLI

  • If you’re using an older version of uni-app, it might still use app-plus. Update to the latest version of uni-app to ensure compatibility with the app platform.
  • Run the following command to update:
    npm install -g @dcloudio/uni-cli

5. Rebuild the Project

  • After making the necessary changes, rebuild your project to ensure the configurations are applied correctly:
    npm run dev:app
  • Or, for production:
    npm run build:app
回到顶部
AI 助手
你好,我是IT营的 AI 助手
您可以尝试点击下方的快捷入口开启体验!