代码之家  ›  专栏  ›  技术社区  ›  Alex Lum

WSO2:无法构建系统服务cdmf android agent

  •  1
  • Alex Lum  · 技术社区  · 7 年前

    当我尝试构建系统服务应用程序时,我得到了以下结果:

    我使用android studio 3.0.0

    SDK API-24

    构建工具26.0.2

    我使用此文档: https://docs.wso2.com/display/IoTS300/Integrating+the+Android+System+Service+Application#IntegratingtheAndroidSystemServiceApplication-Operationssupportedviathesystemserviceapplication

    Information:Gradle tasks [clean, :app:assembleDebug]
    C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master      \system-service\app\src\main\java\org\wso2\iot\system\service\api\NetworkConnectedReceiver.java
    Error:(64, 28) error: cannot find symbol method getCurrentUser()
    Error:(65, 70) error: cannot find symbol method getCurrentUser()
    C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\api\OTAServerManager.java
    Error:(21, 26) error: cannot find symbol class NonNull
    Error:(36, 18) error: cannot find symbol class SystemProperties
    Error:(278, 30) error: cannot find symbol class NonNull
    Error:(162, 41) error: cannot find symbol variable SystemProperties
    C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\api\SettingsManager.java
    Error:(33, 42) error: cannot find symbol method setDeviceOwner(ComponentName)
    C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\SystemService.java
    Error:(35, 18) error: cannot find symbol class SystemProperties
    Error:(426, 42) error: cannot find symbol method getLegacyExternalStorageDirectory()
    Error:(718, 21) error: cannot find symbol variable SystemProperties
    C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\utils\AppUtils.java
    Error:(20, 19) error: cannot find symbol class PackageInstallObserver
    Error:(22, 26) error: cannot find symbol class IPackageDeleteObserver
    Error:(57, 9) error: cannot find symbol class PackageInstallObserver
    Error:(57, 47) error: cannot find symbol class PackageInstallObserver
    Error:(214, 9) error: cannot find symbol class IPackageDeleteObserver
    Error:(214, 47) error: cannot find symbol class IPackageDeleteObserver
    C:\Users\xxx\Downloads\cdmf-agent-android-master\cdmf-agent-android-master\system-service\app\src\main\java\org\wso2\iot\system\service\utils\CommonUtils.java
    Error:(53, 16) error: cannot find symbol method startServiceAsUser(Intent,UserHandle)
    Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.
    Information:BUILD FAILED in 7s
    Information:18 errors
    Information:0 warnings
    Information:See complete output in console
    

    注意,在我的sdk中,我可以看到类NonNull和SystemProperties。

    谢谢你的帮助。 当做

    1 回复  |  直到 7 年前
        1
  •  4
  •   Charitha    7 年前

    您似乎没有使用正确的目标SDK和隐藏API。

    请跟随 Prerequisites section 自定义android APK文档以设置android studio环境。那个么你们就可以构建系统应用程序了。