Skip to content

Commit 76dc9c4

Browse files
author
Fatme
authored
Merge pull request #4724 from NativeScript/fatme/fix-android-app-resources
fix: fix the way android appResources are processed
2 parents 127512f + 2f214b6 commit 76dc9c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/services/android-project-service.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
289289

290290
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
291291

292-
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "*"), platformsAppResourcesPath);
293-
const appResourcesDirStructureHasMigrated = this.$androidResourcesMigrationService.hasMigrated(projectAppResourcesPath);
292+
const appResourcesDirStructureHasMigrated = this.$androidResourcesMigrationService.hasMigrated(projectAppResourcesPath);
294293
if (appResourcesDirStructureHasMigrated) {
295-
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "src", "*"), platformsAppResourcesPath);
294+
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, constants.SRC_DIR, "*"), platformsAppResourcesPath);
296295
} else {
296+
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "*"), platformsAppResourcesPath);
297297
// https://github.com/NativeScript/android-runtime/issues/899
298298
// App_Resources/Android/libs is reserved to user's aars and jars, but they should not be copied as resources
299299
this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, "libs"));

0 commit comments

Comments
 (0)