I'm trying to setup a client with the system service. I'm getting a build errror when trying to build client app. Here is the log:
$ ./gradlew clean assemble
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
nnedic-mbp:client nnedic$ ./gradlew clean assemble
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Already observed package id 'add-ons;addon-google_apis-google-19' in '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19'. Skipping duplicate at '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1'
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Already observed package id 'add-ons;addon-google_apis-google-19' in '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19'. Skipping duplicate at '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1'
Incremental java compilation is an incubating feature.
:client:clean
:iDPProxy:clean
:client:preBuild UP-TO-DATE
:client:preDebugBuild UP-TO-DATE
:client:checkDebugManifest
:client:preDebugCopeBuild UP-TO-DATE
:client:preReleaseBuild UP-TO-DATE
:client:preStagingBuild UP-TO-DATE
:client:preStandaloneBuild UP-TO-DATE
:client:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:client:prepareComAndroidSupportAppcompatV72531Library
:client:prepareComAndroidSupportDesign2531Library
:client:preDebugAndroidTestBuild UP-TO-DATE
:client:prepareComAndroidSupportMultidex101Library
:client:prepareComAndroidSupportRecyclerviewV72531Library
:client:prepareComAndroidSupportSupportCompat2531Library
:client:prepareComAndroidSupportSupportCoreUi2531Library
:client:prepareComAndroidSupportSupportCoreUtils2531Library
:client:prepareComAndroidSupportSupportFragment2531Library
:client:prepareComAndroidSupportSupportMediaCompat2531Library
:client:prepareComAndroidSupportSupportV42531Library
:client:prepareComAndroidSupportSupportVectorDrawable2531Library
:client:prepareComAndroidSupportTransition2531Library
:client:prepareComAndroidVolleyVolley100Library
:client:prepareComGoogleAndroidGmsPlayServicesBasement1024Library
:client:prepareComGoogleAndroidGmsPlayServicesTasks1024Library
:client:prepareComGoogleFirebaseFirebaseAnalytics1024Library
:client:prepareComGoogleFirebaseFirebaseAnalyticsImpl1024Library
:client:prepareComGoogleFirebaseFirebaseCommon1024Library
:client:prepareComGoogleFirebaseFirebaseCore1024Library
:client:prepareComGoogleFirebaseFirebaseIid1024Library
:client:prepareComGoogleFirebaseFirebaseMessaging1024Library
:iDPProxy:preBuild UP-TO-DATE
:iDPProxy:preDebugBuild UP-TO-DATE
:iDPProxy:checkDebugManifest
:iDPProxy:preDebugAndroidTestBuild UP-TO-DATE
:iDPProxy:preDebugUnitTestBuild UP-TO-DATE
:iDPProxy:preReleaseBuild UP-TO-DATE
:iDPProxy:preReleaseUnitTestBuild UP-TO-DATE
:iDPProxy:preStagingBuild UP-TO-DATE
:iDPProxy:preStagingUnitTestBuild UP-TO-DATE
:iDPProxy:preStandaloneBuild UP-TO-DATE
:iDPProxy:preStandaloneUnitTestBuild UP-TO-DATE
:iDPProxy:prepareComAndroidVolleyVolley100Library
:iDPProxy:prepareDebugDependencies
:iDPProxy:compileDebugAidl
:iDPProxy:compileDebugNdk UP-TO-DATE
:iDPProxy:compileLint
:iDPProxy:copyDebugLint UP-TO-DATE
:iDPProxy:mergeDebugShaders
:iDPProxy:compileDebugShaders
:iDPProxy:generateDebugAssets
:iDPProxy:mergeDebugAssets
:iDPProxy:mergeDebugProguardFiles
:iDPProxy:packageDebugRenderscript UP-TO-DATE
:iDPProxy:compileDebugRenderscript
:iDPProxy:generateDebugResValues
:iDPProxy:generateDebugResources
:iDPProxy:packageDebugResources
:iDPProxy:processDebugManifest
:iDPProxy:generateDebugBuildConfig
:iDPProxy:mergeDebugResources
:iDPProxy:processDebugResources
:iDPProxy:generateDebugSources
:iDPProxy:incrementalDebugJavaCompilationSafeguard
:iDPProxy:javaPreCompileDebug
:iDPProxy:compileDebugJavaWithJavac
:iDPProxy:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:iDPProxy:processDebugJavaRes UP-TO-DATE
:iDPProxy:transformResourcesWithMergeJavaResForDebug
:iDPProxy:transformClassesAndResourcesWithSyncLibJarsForDebug
:iDPProxy:mergeDebugJniLibFolders
:iDPProxy:transformNativeLibsWithMergeJniLibsForDebug
:iDPProxy:transformNativeLibsWithStripDebugSymbolForDebug
:iDPProxy:transformNativeLibsWithSyncJniLibsForDebug
:iDPProxy:bundleDebug
:client:prepareDebugDependencies
:client:compileDebugAidl
:client:compileDebugRenderscript
:client:generateDebugBuildConfig
:client:generateDebugResValues
:client:generateDebugResources
:client:mergeDebugResources
:client:processDebugManifest
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/AndroidManifest.xml:35:5-68 Warning:
Element uses-permission#android.permission.READ_LOGS at AndroidManifest.xml:35:5-68 duplicated with element declared at AndroidManifest.xml:31:5-68
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/AndroidManifest.xml:56:5-84 Warning:
Element uses-permission#android.permission.WAKE_LOCK at AndroidManifest.xml:56:5-84 duplicated with element declared at AndroidManifest.xml:22:5-68
:client:processDebugResources
:client:generateDebugSources
:client:incrementalDebugJavaCompilationSafeguard
:client:javaPreCompileDebug
:client:compileDebugJavaWithJavac
:client:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/api/RuntimeInfo.java:157: error: cannot find symbol
String filePath = Environment.getLegacyExternalStorageDirectory() + "/logcat.log";
^
symbol: method getLegacyExternalStorageDirectory()
location: class Environment
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/services/AlarmReceiver.java:52: error: cannot find symbol
operation = (Operation) intent.getExtra(context.getResources().getString(R.string.alarm_scheduled_operation_payload));
^
symbol: method getExtra(String)
location: variable intent of type Intent
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/services/LocationUpdateReceiver.java:31: error: cannot find symbol
location = (Location) intent.getExtra(Constants.Location.LOCATION);
^
symbol: method getExtra(String)
location: variable intent of type Intent
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/services/NetworkConnectedReceiver.java:42: error: cannot find symbol
context.startServiceAsUser(autoEnrollIntent, android.os.Process.myUserHandle());
^
symbol: method startServiceAsUser(Intent,UserHandle)
location: variable context of type Context
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/utils/CommonUtils.java:417: error: cannot find symbol
context.startServiceAsUser(intent, android.os.Process.myUserHandle());
^
symbol: method startServiceAsUser(Intent,UserHandle)
location: variable context of type Context
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/utils/CommonUtils.java:430: error: cannot find symbol
context.startServiceAsUser(intent, android.os.Process.myUserHandle());
^
symbol: method startServiceAsUser(Intent,UserHandle)
location: variable context of type Context
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
:client:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':client:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 13.856 secs
It appears that the client is using private APIs? Is there a way to build the client application with use system service flag set to true?