henrychavez / nativescript-bottom-navigation

Nativescript plugin for Android & iOS to have the bottom navigation bar of Material Design
Apache License 2.0
58 stars 18 forks source link

[BUG] Build fails on Android when building with NativeScript 6.x.x #69

Closed VladimirAmiorkov closed 5 years ago

VladimirAmiorkov commented 5 years ago

Before start:


Which platform(s) does your issue occur on?

What type of device?

Please, provide the following version numbers that your issue occurs with:

I think you simply need to release this fix: to npmjs.com https://github.com/henrychavez/nativescript-bottom-navigation/pull/55

Error:

$ tns run android Searching for devices... Copying template files... Platform android successfully added. v6.0.0 Preparing project... File change detected. Starting incremental webpack compilation...

webpack is watching the files…

Hash: c64c5d2534367330af9a Version: webpack 4.27.1 Time: 29261ms Built at: 04/08/2019 23:56:32 Asset Size Chunks Chunk Names bundle.js 658 KiB bundle [emitted] bundle package.json 312 bytes [emitted]
runtime.js 71.4 KiB runtime [emitted] runtime tns-java-classes.js 0 bytes [emitted]
vendor.js 15.2 MiB vendor [emitted] vendor Entrypoint bundle = runtime.js vendor.js bundle.js [./app.component.ts] 5.34 KiB {bundle} [built] [./app.css] 916 bytes {bundle} [built] [./app.module.ts] 3.49 KiB {bundle} [built] [./app.routing.ts] 875 bytes {bundle} [built] [./board/board.service.ts] 8.3 KiB {bundle} [built] [./board/code/code-board.component.ts] 13.5 KiB {bundle} [built] [./board/multi-board.component.ts] 47 KiB {bundle} [built] [./board/single-board.component.ts] 28.5 KiB {bundle} [built] [./board/single-image.component.ts] 7.36 KiB {bundle} [built] [./helper/custom-element-register.ts] 419 bytes {bundle} [built] [./login/login.component.ts] 13.2 KiB {bundle} [built] [./main.ts] 1.92 KiB {bundle} [built] [./shared/content-reporting.service.ts] 2.28 KiB {bundle} [built] [./shared/drawer.service.ts] 906 bytes {bundle} [built] [./shared/index.ts] 336 bytes {bundle} [built]

  • 531 hidden modules Webpack compilation complete. Watching for file changes. Webpack build done! Project successfully prepared (android) Building project... Gradle build...
    • setting applicationId
    • applying user-defined configuration from /app/app/App_Resources/Android/before-plugins.gradle
    • applying user-defined configuration from /app/app/App_Resources/Android/app.gradle
    • using andorid X library androidx.legacy:legacy-support-v4:1.0.0
    • adding nativescript runtime package dependency: nativescript-optimized-with-inspector
    • adding aar plugin dependency: /app/node_modules/nativescript-bottom-navigation/platforms/android/nativescript_bottom_navigation.aar
    • adding aar plugin dependency: /app/node_modules/nativescript-camera/platforms/android/nativescript_camera.aar
    • adding aar plugin dependency: /app/node_modules/nativescript-geolocation/platforms/android/nativescript_geolocation.aar
    • adding aar plugin dependency: /app/node_modules/nativescript-imagepicker/platforms/android/nativescript_imagepicker.aar
    • adding aar plugin dependency: /app/node_modules/nativescript-ui-listview/platforms/android/TNSListView-release.aar
    • adding aar plugin dependency: /app/node_modules/nativescript-ui-sidedrawer/platforms/android/TNSSideDrawer-release.aar
    • adding aar plugin dependency: /app/node_modules/nativescript-ui-core/platforms/android/TNSCore-release.aar
    • adding aar plugin dependency: /app/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar Exception in thread "main" java.lang.RuntimeException: Class not found android.support.v4.view.ViewPager.OnPageChangeListener at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:549) at org.nativescript.staticbindinggenerator.Generator.getInterfacesFromCache(Generator.java:532) at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:283) at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:171) at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:234) at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:121) at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97) at org.nativescript.staticbindinggenerator.Main.main(Main.java:50)
henrychavez commented 5 years ago

Hi @VladimirAmiorkov,

please follow the instructions in this comment

the {N} team has its own implementation of bottom navigation that's why you are getting that error.

I'll release a major update of the plugin changing the name to BottomNavigationBar to avoid conflicts and will be available here in this repo and also as part of the nativescript-material-components.

henrychavez commented 5 years ago

68

VladimirAmiorkov commented 5 years ago

Awesome, thank you.