3

Try to use below function:

public void createObjectType() {

    try {
        mCloudDB.createObjectType(ObjectTypeInfoHelper.getObjectTypeInfo());
    } catch (AGConnectCloudDBException exp) {
        System.out.println("##error " + exp.toString());
    }
}

Crash log:

D/NaturalBase: CreateObjectType: ObjectType count: 19, version: 19

E/NaturalBase: CreateObjectType: ObjectType version downgrade is not supported. current version: 86

E/AGConnectCloudDB: Failed to create object type into the AGCConnectCloudDB.

D/AndroidRuntime: Shutting down VM

But my ObjectType is only 19. what's happened?

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
Rob
  • 31
  • 2

2 Answers2

1

In the Crash log:

ObjectType version downgrade is not supported.

The error log shows that the problem is caused by the downgrading of Object_TYPE_VERSION from 86 to 19 in your project and the overwriting of the installation on your phone.

So you can try to uninstall the app whose Object_TYPE_VERSION is 86 and reinstall it may solve your issue.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
0

Normally it's caused by the local cached DB on the device. When you ran older version of app, the app will cached the DB to local disk and the version won't be reduced.

The solution is to delete the old version of the app installed on your device. Then install the latest version of the app. For detail info, pls refer to official doc as below.

https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-clouddb-agcconsole-objecttypes-0000001127675459

Zinna
  • 1,947
  • 2
  • 5
  • 20