尝试使用下面的函数:
public void createObjectType() {
try {
mCloudDB.createObjectType(ObjectTypeInfoHelper.getObjectTypeInfo());
} catch (AGConnectCloudDBException exp) {
System.out.println("##error " + exp.toString());
}
}
崩溃日志:
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
但是我的 ObjectType 只有 19,这是怎么回事?
最佳答案
在崩溃日志中:
ObjectType version downgrade is not supported.
错误日志显示问题是由于你的项目中Object_TYPE_VERSION从86降级到19以及覆盖安装在您的手机上。
所以您可以尝试卸载Object_TYPE_VERSION为86的应用,重新安装可能会解决您的问题。
关于android - 华为云数据库创建对象类型()崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68462898/