Closed iamshaunwu closed 6 months ago
To add on, I have tried the below steps but the same error still shows.
Appreciate if you can advise urgently, as we have a tight deadline to meet. Thanks!
Communicated with Huawei Developer Support. Apparently, there is nothing wrong with the package. However, the documentation is still in the process of update.
Solution: Instead of placing the java files onto your own android app folder, paste these files directly onto the package android folder instead - /Users/myName/.pub-cache/hosted/pub.dev/agconnect_clouddb-1.9.0+300/android/src/main/java/com/huawei/agconnectclouddb/objecttypes.
As for my case as I have multiple projects, so as not to complicated the different object types, I duplicated this package onto my project folder and added the path in pubspec.yaml. Then pasted the java files directly onto the replicated package android folder.
Closing this since it is a documentation issue.
Hi!
I encountered the following error for
agconnect_clouddb: ^1.9.0+300
on Flutter 3.16.9 despite following the documentation. Please enlighten. Thanks!I have already unzipped the exported files (ObjectTypeInfoHelper.java & cloudDbZoneTest.java) to the required folder.
This is my app level build.gradle.
def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } }
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' }
def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' }`
`android { namespace "com.example.app" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion
}
flutter { source '../..' }
dependencies {}
buildscript { ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() maven {url 'https://developer.huawei.com/repo/'} }
}
allprojects { repositories { google() mavenCentral() maven {url 'https://developer.huawei.com/repo/'} } }
rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') }
tasks.register("clean", Delete) { delete rootProject.buildDir }
/Users/myName/.pub-cache/hosted/pub.dev/agconnect_clouddb-1.9.0+300/android/src/main/java/com/huawei/agconnectclouddb/utils/AGCCloudDBUtil.java:8: error: package com.huawei.agconnectclouddb.objecttypes does not exist import com.huawei.agconnectclouddb.objecttypes.ObjectTypeInfoHelper; ^ /Users/myName/.pub-cache/hosted/pub.dev/agconnect_clouddb-1.9.0+300/android/src/main/java/com/huawei/agconnectclouddb/modules/AGCCloudDBModule.java:29: error: package com.huawei.agconnectclouddb.objecttypes does not exist import com.huawei.agconnectclouddb.objecttypes.ObjectTypeInfoHelper; ^ /Users/myName/.pub-cache/hosted/pub.dev/agconnect_clouddb-1.9.0+300/android/src/main/java/com/huawei/agconnectclouddb/utils/AGCCloudDBUtil.java:14: error: cannot find symbol for (Class<? extends CloudDBZoneObject> clazz : ObjectTypeInfoHelper.getObjectTypeInfo().getObjectTypes()) { ^ symbol: variable ObjectTypeInfoHelper location: class AGCCloudDBUtil /Users/myName/.pub-cache/hosted/pub.dev/agconnect_clouddb-1.9.0+300/android/src/main/java/com/huawei/agconnectclouddb/modules/AGCCloudDBModule.java:77: error: cannot find symbol AGConnectCloudDB.getInstance().createObjectType(ObjectTypeInfoHelper.getObjectTypeInfo()); ^ symbol: variable ObjectTypeInfoHelper location: class AGCCloudDBModule