android library can not found when compile the plugin project on Intellij 2019.2.4 but work on 2019.1

Answered

the project running on Linux system and gradle file 

intellij {
pluginName 'AndroidWizard'
plugins = ['properties', 'Groovy', 'gradle', 'junit', 'android', 'smali', 'IntelliLang','kotlin']
updateSinceUntilBuild false
sandboxDirectory = "${rootProject.rootDir}/idea-sandbox"
// You can change here the Android Studio path if needed
// If you don't have the Android Studio installed, the plugin will run with an IntelliJ IDE
def androidStudioPath = (OperatingSystem.current().isMacOsX() || OperatingSystem.current().isLinux()) ?
'/Applications/Android Studio.app' : 'C:\\Program Files\\Android\\Android Studio\\'

if (new File(androidStudioPath).exists()) {
localPath androidStudioPath
alternativeIdePath androidStudioPath
} else {
version intellijVersion
}
}

the error log:

15:25:15 > Task :compileJava
15:25:32 /xmake/j/prod-build10210/w/cloudandroidsdk/cloudandroidsdk-cloud-assistant-android-PR-linuxx86_64/src/main/java/com/sap/cloud/mobile/android/assistant/translationhub/wizard/manager/TranslationHubWizard.java:3: error: package android.os does not exist
15:25:32 import android.os.AsyncTask;
15:25:32 ^
15:25:32 /xmake/j/prod-build10210/w/cloudandroidsdk/cloudandroidsdk-cloud-assistant-android-PR-linuxx86_64/src/main/java/com/sap/cloud/mobile/android/assistant/wizard/manager/ApiManWizard.java:3: error: package android.os does not exist
15:25:32 import android.os.AsyncTask;
15:25:32 ^
15:25:32 /xmake/j/prod-build10210/w/cloudandroidsdk/cloudandroidsdk-cloud-assistant-android-PR-linuxx86_64/src/main/java/com/sap/cloud/mobile/android/assistant/wizard/manager/AssistantWizard.java:3: error: package android.os does not exist
15:25:32 import android.os.AsyncTask;
15:25:32 ^
15:25:33 /xmake/j/prod-build10210/w/cloudandroidsdk/cloudandroidsdk-cloud-assistant-android-PR-linuxx86_64/src/main/java/com/sap/cloud/mobile/android/assistant/translationhub/wizard/manager/TranslationHubWizard.java:72: error: cannot find symbol
15:25:33 AsyncTask.execute(() -> commitStepData(step).thenAccept(isCommitted -> {
15:25:33 ^
15:25:33 symbol: variable AsyncTask
15:25:33 location: class TranslationHubWizard
15:25:33 /xmake/j/prod-build10210/w/cloudandroidsdk/cloudandroidsdk-cloud-assistant-android-PR-linuxx86_64/src/main/java/com/sap/cloud/mobile/android/assistant/wizard/manager/ApiManWizard.java:67: error: cannot find symbol
15:25:33 AsyncTask.execute(() -> commitStepData(step).thenAccept(isCommitted -> {
15:25:33 ^
15:25:33 symbol: variable AsyncTask
15:25:33 location: class ApiManWizard
15:25:33 /xmake/j/prod-build10210/w/cloudandroidsdk/cloudandroidsdk-cloud-assistant-android-PR-linuxx86_64/src/main/java/com/sap/cloud/mobile/android/assistant/wizard/manager/AssistantWizard.java:132: error: cannot find symbol
15:25:33 AsyncTask.execute(() -> commitStepData(step).thenAccept(isCommitted -> {
15:25:33 ^
15:25:33 symbol: variable AsyncTask
15:25:33 location: class AssistantWizard
15:25:34 Note: Some input files use or override a deprecated API.
15:25:34 Note: Recompile with -Xlint:deprecation for details.
15:25:34 Note: Some input files use unchecked or unsafe operations.
15:25:34 Note: Recompile with -Xlint:unchecked for details.

1 comment
Comment actions Permalink

AFAIU you're using AndroidOS class "android.os.AsyncTask" from your plugin. Version of Android SDK you are referring to from your plugin is not the same used in the two AS distributions.

0

Please sign in to leave a comment.