Skip to content

Commit 28b95eb

Browse files
FatmeFatme
Fatme
authored and
Fatme
committed
Merge pull request #861 from NativeScript/fatme/fix-plugin-remove
Fixes #860
2 parents db63038 + 3bb6540 commit 28b95eb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/services/android-project-service.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,12 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
256256
public removePluginNativeCode(pluginData: IPluginData): IFuture<void> {
257257
return (() => {
258258
let pluginPlatformsFolderPath = this.getPluginPlatformsFolderPath(pluginData, AndroidProjectService.ANDROID_PLATFORM_NAME);
259-
let pluginJars = this.$fs.enumerateFilesInDirectorySync(path.join(pluginPlatformsFolderPath, AndroidProjectService.LIBS_FOLDER_NAME));
260-
261259
let libsFolderPath = path.join(pluginPlatformsFolderPath, AndroidProjectService.LIBS_FOLDER_NAME);
262-
_.each(pluginJars, jarName => this.$fs.deleteFile(path.join(libsFolderPath, jarName)).wait());
260+
261+
if(this.$fs.exists(libsFolderPath).wait()) {
262+
let pluginJars = this.$fs.enumerateFilesInDirectorySync(libsFolderPath);
263+
_.each(pluginJars, jarName => this.$fs.deleteFile(path.join(libsFolderPath, jarName)).wait());
264+
}
263265
}).future<void>()();
264266
}
265267

0 commit comments

Comments
 (0)