react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Theme not working when generating release build APK RNP 4.2.0

Open ezekel opened this issue 5 years ago • 25 comments

Hi after issuing this command npx react-native run-android --variant=release and install the release apk to my real device the theme is not working

RN version : [email protected]

RNP version: [email protected]

react-native-vector-icons:[email protected] Header is black instead default color purplr image

but in emulator it works

image

ezekel avatar Sep 21 '20 09:09 ezekel

Couldn't find version numbers for the following packages in the issue:

  • react-native-vector-icons

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • react-native-paper (found: 4.1.0, latest: 4.2.0)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] avatar Sep 21 '20 09:09 github-actions[bot]

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • react-native-paper (found: 4.1.0, latest: 4.2.0)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

github-actions[bot] avatar Sep 21 '20 09:09 github-actions[bot]

Not working in react-native-paper [email protected]

ezekel avatar Sep 21 '20 09:09 ezekel

@satya164 , please help

ezekel avatar Sep 21 '20 10:09 ezekel

It appears to be a trouble with the babel.config.js, I've removed the react-native-paper/babel from my babel.config.js and it seems to work properly when I perform a production build.

JonatanSalas avatar Sep 29 '20 14:09 JonatanSalas

same here Default theme only after build

MohammedFaragallah avatar Oct 03 '20 09:10 MohammedFaragallah

I notice that a bunch of my theme doesn't work in production builds (fine in test builds).

Is it safe to just remove react-native-paper/babel? What does that plugin usually do?

actuallymentor avatar Oct 27 '20 11:10 actuallymentor

I don't know if it is safe to remove it. I think that the plugin might remove unused components and perform other optimizations behind the scenes, but as workaround for now it works well.

JonatanSalas avatar Oct 27 '20 11:10 JonatanSalas

I don't know if it is safe to remove it. I think that the plugin might remove unused components and perform other optimizations behind the scenes, but as workaround for now it works well.

I can confirm my apps do build and run, but it's a bit distressing that such a central plugin to the package is malfunctioning on production.

actuallymentor avatar Oct 27 '20 17:10 actuallymentor

I'm having a similar trouble using expo and react-native-paper. After build the cards of paper are rendering on dark theme even forcing a light theme on expo app.json and using DefaultTheme from react-native-paper. I can't reproduce this on development mode.

I'm using [email protected] and [email protected]

I'm not sure if is the same issue anyway.

lucascampelo avatar Oct 29 '20 00:10 lucascampelo

I have the same issue, I was getting crazy finding the issue. The Babel-Thing is a good workaround for now.

hirbod avatar Nov 15 '20 07:11 hirbod

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

github-actions[bot] avatar Jan 15 '21 00:01 github-actions[bot]

Still relevant, still unanswered

hirbod avatar Jan 15 '21 07:01 hirbod

Issue persist on react-native-paper@^4.7.0

lucascampelo avatar Jan 19 '21 21:01 lucascampelo

@satya164 could you have a look at this?

hirbod avatar Jan 20 '21 12:01 hirbod

Please don't ping me. There are other maintainers in this repo as well, and maintainers get notifications for every issue.

If you want more attention on an issue, you should join the discord and post there https://discord.gg/zwR2Cdh

satya164 avatar Jan 20 '21 12:01 satya164

Thanks, I'll leave a comment there

hirbod avatar Jan 20 '21 12:01 hirbod

I have the same issue, I was getting crazy finding the issue. The Babel-Thing is a good workaround for now.

@Hirbod I've tried here, but still have the problem here. Can you explain the workaround ?

lucascampelo avatar Jan 31 '21 18:01 lucascampelo

Same issue. Only work around is use, AppRegistry.registerComponent(appName, () => App); as other paper components works fine without the theme.

projit-thetaonelab avatar May 31 '21 18:05 projit-thetaonelab

I have the same issue, I was getting crazy finding the issue. The Babel-Thing is a good workaround for now.

@Hirbod I've tried here, but still have the problem here. Can you explain the workaround ?

The work around is to remove this from your babel.config.js file. Removing this plugin does cause the release app size to increase significantly.

  env: {
    production: {
      plugins: ['react-native-paper/babel'],
    },
  },

kidculli avatar Nov 29 '21 22:11 kidculli

Looks like this issue is still unresolved, right?

hirbod avatar Nov 29 '21 22:11 hirbod

Looks like this issue is still unresolved, right?

Yep I ran into it today and found this issue

kidculli avatar Nov 30 '21 03:11 kidculli

is this happening with latest version?

raajnadar avatar Nov 30 '21 06:11 raajnadar

I tried with 4.9.2 I can try with the latest @raajnadar

kidculli avatar Dec 02 '21 20:12 kidculli

Still an issue with 4.12.4 Build only shows default theme with 'react-native-paper/babel' in the babel.config.js

Bashin avatar Aug 08 '22 15:08 Bashin

Does the issue exist with the react-native-paper latest version?

lukewalczak avatar Mar 31 '23 12:03 lukewalczak

This issue still exists with the latest version of [email protected] @lukewalczak. As before, removing the babel plugin restores proper theming behaviour.

My environment:

"react": "18.2.0",
"react-native": "0.72.3",
"react-native-paper": "5.10.0",
"react-native-vector-icons": "10.0.0",

kaisoapbox avatar Aug 09 '23 00:08 kaisoapbox