Skip to content

Commit e413c32

Browse files
committed
fix(android): custom activities, order of webpack declarations and clarifications
1 parent 521b583 commit e413c32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/guide/extending-classes-and-implementing-interfaces-android.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ This approach will not work if `application.android.ts` requires external module
282282

283283
@nativescript/core ships with a default `androidx.appcompat.app.AppCompatActivity` implementation, that bootstraps the NativeScript application, without forcing users to declare their custom Activity in every project. In some cases you may need to implement a custom Android Activity.
284284

285-
Create a new `activity.android.ts` or `activity.android.js` when using plain JS.
285+
Create a new `./src/activity.android.ts` or `./src/activity.android.js` when using plain JS.
286286

287287
::: info Note
288288
Note the `.android` suffix - we only want this file on Android.
@@ -493,9 +493,9 @@ To include the new Activity in the build, make sure it's added to the `webpack.c
493493
const webpack = require('@nativescript/webpack')
494494

495495
module.exports = (env) => {
496-
env.appComponents = (env.appComponents || []).concat(['./activity.android'])
497-
498496
webpack.init(env)
497+
env.appComponents = (env.appComponents || []).concat(['./src/activity.android'])
498+
499499

500500
return webpack.resolveConfig()
501501
}

0 commit comments

Comments
 (0)