invertase / notifee

⚛️ A feature rich notifications library for React Native.
https://notifee.app
Apache License 2.0
1.79k stars 213 forks source link

Expo SDK 49 compatibility issue #808

Closed Thanaen closed 3 weeks ago

Thanaen commented 1 year ago

Hello,

The first beta of the Expo 49 SDK has just been released, and I wanted to compile my application with it to see if it worked. I've only tried it on Android for the moment, and I'm getting this error:

Could not determine the dependencies of task ':app:lintVitalReportRelease'.
> Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not find any matches for app.notifee:core:+ as no versions of app.notifee:core are available.
     Searched in the following locations:
       - file:/Users/user/Desktop/Dev/app-name/node_modules/react-native/android/app/notifee/core/maven-metadata.xml
       - file:/Users/user/Desktop/Dev/app-name/node_modules/jsc-android/dist/app/notifee/core/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/app/notifee/core/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/app/notifee/core/maven-metadata.xml
       - https://www.jitpack.io/app/notifee/core/maven-metadata.xml
       - https://oss.sonatype.org/content/repositories/snapshots/app/notifee/core/maven-metadata.xml
     Required by:
         project :app > project :notifee_react-native

I'm thinking it might be linked to the switch to gradle 8.

Nothing urgent, since SDK 49 is only in beta, but I thought I'd give you a heads-up. :)

mikehardy commented 1 year ago

Hey there - could be - I haven't tested notifee with rn72 / gradle 8 yet, but we do a little magic here to add our compiled AAR android library (which is in a local maven repository) to the set of maven repositories in the project.

I think this is it

https://github.com/invertase/notifee/blob/main/packages/react-native/android/build.gradle https://github.com/invertase/notifee/blob/94cb4bc16e835f815fd97fa3c0263afc4ebf5524/packages/react-native/android/build.gradle#L107-L112

Perhaps that's failing now...

Thanaen commented 1 year ago

Just to let you know, Expo's SDK 49 has just been released from beta!

PS: I'm not saying this to be pushy or anything, it's just to keep the context of this issue up to date.

d11dev commented 1 year ago

Facing the same issue as well after upgrading to Expo 49

Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find any matches for app.notifee:core:+ as no versions of app.notifee:core are available.
     Searched in the following locations:
       - file:/C:/Users/d11dev/GitHub/ProjectName/node_modules/react-native/android/app/notifee/core/maven-metadata.xml
       - file:/C:/Users/d11dev/GitHub/ProjectName/node_modules/jsc-android/dist/app/notifee/core/maven-metadata.xml
       - file:/C:/Users/d11dev/GitHub/ProjectName/apps/node_modules/@notifee/react-native/android/libs/app/notifee/core/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/app/notifee/core/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/app/notifee/core/maven-metadata.xml
       - https://www.jitpack.io/app/notifee/core/maven-metadata.xml
       - https://oss.sonatype.org/content/repositories/snapshots/app/notifee/core/maven-metadata.xml
     Required by:
         project :app > project :notifee_react-native

Additional context, this is a monorepo

d11dev commented 1 year ago

Facing the same issue as well after upgrading to Expo 49

....

Following up on this, I was able to temporarily fix the issue with this config code (very rough):

import {
  ConfigPlugin,
  withPlugins,
  withProjectBuildGradle,
  WarningAggregator,
} from "@expo/config-plugins";

import { mergeContents } from "@expo/config-plugins/build/utils/generateCode";

const MODULE_NAME = "rn-project-build-gradle";

const notifeeImport = `import java.nio.file.Paths`;

const notifeeFindNodeModulePath = `
def findNodeModulePath(baseDir, packageName) {
  def basePath = baseDir.toPath().normalize()
  // Node's module resolution algorithm searches up to the root directory,
  // after which the base path will be null
  while (basePath) {
    def candidatePath = Paths.get(basePath.toString(), "node_modules", packageName)
    if (candidatePath.toFile().exists()) {
      return candidatePath.toString()
    }
    basePath = basePath.getParent()
  }
  return null
}

def notifeeDir = findNodeModulePath(projectDir, "@notifee/react-native") ?: "$rootDir/../node_modules/@notifee/react-native"`;

const notifeeCoreMavenUrl = `maven {
          url "$notifeeDir/android/libs"
        }
        google()`;

const androidPlugin: ConfigPlugin<Map<string, string | boolean>> = (
  config,
  props,
) => {
  return withProjectBuildGradle(
    config,
    async ({ modResults, ...subConfig }) => {
      if (modResults.language !== "groovy") {
        WarningAggregator.addWarningAndroid(
          "withExpoProjectGradle",
          `Cannot automatically configure project build.gradle if it's not groovy`,
        );
        return { modResults, ...subConfig };
      }

      // notifeeImport
      modResults.contents = await applyGradleMod(
        modResults.contents,
        notifeeImport,
        /buildscript(?:\s+)?\{/,
        true,
        0,
      );

      // notifeeFindNodeModulePath
      modResults.contents = await applyGradleMod(
        modResults.contents,
        notifeeFindNodeModulePath,
        /allprojects(?:\s+)?\{/,
        true,
        1,
      );

      // notifeeCoreMavenUrl
      const regex =
        /(?<=allprojects\s*{[\s\S]*repositories\s*{[\s\S]*?)google\(\)/g;
      modResults.contents = modResults.contents.replace(
        regex,
        notifeeCoreMavenUrl,
      );

      return { modResults, ...subConfig };
    },
  );
};

const withExpoProjectGradle: ConfigPlugin<{} | void> = (config, _props) => {
  const props = _props || {};

  return withPlugins(config, [
    [androidPlugin, new Map<string, string | boolean>(Object.entries(props))],
  ]);
};

const applyGradleMod = async (
  buildGradle: string,
  code: string,
  anchorRegex: string | RegExp,
  insertAbove: boolean = false,
  tagNumber: Number = 0,
) => {
  try {
    return mergeContents({
      // Tag needs to be unique so that previous mod does not get deleted
      tag: `${MODULE_NAME}_${tagNumber}`,
      src: buildGradle,
      newSrc: code,
      anchor: anchorRegex,
      // new line will be inserted right above matched anchor when 0
      offset: insertAbove ? 0 : 1,
      comment: "//",
    }).contents;
  } catch (e) {
    console.error(e);
    return buildGradle;
  }
};

export default withExpoProjectGradle;

Seems like rootProject.allProjects is not working correctly Gradle 8+ or might be another issue

Thanaen commented 1 year ago

Wow, that's a hardcore plugin! I'm going to give this a quick try. Thanks for the workaround!

UltraWelfare commented 1 year ago

I have the same issue trying to install the app on SDK 49. I unfortunately can't take the path of downgrading to SDK 48, I hope this can be resolved easily....

Thanaen commented 1 year ago

Have you tried using the plugin made by @d11dev? It works fine for me!

UltraWelfare commented 1 year ago

Yeah I'm on my way exploring on how to add config code like this. However an official solution would be preferred, you never know what other bugs may surface, especially in production code. I would definitely give it a try though, thanks for the solution!

For anyone curious how to add the config code, you can look at this documentation here

simonitfi commented 1 year ago

Facing the same issue as well after upgrading to Expo 49 ....

Following up on this, I was able to temporarily fix the issue with this config code (very rough):

import {
  ConfigPlugin,
  withPlugins,
  withProjectBuildGradle,
  WarningAggregator,
} from "@expo/config-plugins";

import { mergeContents } from "@expo/config-plugins/build/utils/generateCode";

const MODULE_NAME = "rn-project-build-gradle";

const notifeeImport = `import java.nio.file.Paths`;

const notifeeFindNodeModulePath = `
def findNodeModulePath(baseDir, packageName) {
  def basePath = baseDir.toPath().normalize()
  // Node's module resolution algorithm searches up to the root directory,
  // after which the base path will be null
  while (basePath) {
    def candidatePath = Paths.get(basePath.toString(), "node_modules", packageName)
    if (candidatePath.toFile().exists()) {
      return candidatePath.toString()
    }
    basePath = basePath.getParent()
  }
  return null
}

def notifeeDir = findNodeModulePath(projectDir, "@notifee/react-native") ?: "$rootDir/../node_modules/@notifee/react-native"`;

const notifeeCoreMavenUrl = `maven {
          url "$notifeeDir/android/libs"
        }
        google()`;

const androidPlugin: ConfigPlugin<Map<string, string | boolean>> = (
  config,
  props,
) => {
  return withProjectBuildGradle(
    config,
    async ({ modResults, ...subConfig }) => {
      if (modResults.language !== "groovy") {
        WarningAggregator.addWarningAndroid(
          "withExpoProjectGradle",
          `Cannot automatically configure project build.gradle if it's not groovy`,
        );
        return { modResults, ...subConfig };
      }

      // notifeeImport
      modResults.contents = await applyGradleMod(
        modResults.contents,
        notifeeImport,
        /buildscript(?:\s+)?\{/,
        true,
        0,
      );

      // notifeeFindNodeModulePath
      modResults.contents = await applyGradleMod(
        modResults.contents,
        notifeeFindNodeModulePath,
        /allprojects(?:\s+)?\{/,
        true,
        1,
      );

      // notifeeCoreMavenUrl
      const regex =
        /(?<=allprojects\s*{[\s\S]*repositories\s*{[\s\S]*?)google\(\)/g;
      modResults.contents = modResults.contents.replace(
        regex,
        notifeeCoreMavenUrl,
      );

      return { modResults, ...subConfig };
    },
  );
};

const withExpoProjectGradle: ConfigPlugin<{} | void> = (config, _props) => {
  const props = _props || {};

  return withPlugins(config, [
    [androidPlugin, new Map<string, string | boolean>(Object.entries(props))],
  ]);
};

const applyGradleMod = async (
  buildGradle: string,
  code: string,
  anchorRegex: string | RegExp,
  insertAbove: boolean = false,
  tagNumber: Number = 0,
) => {
  try {
    return mergeContents({
      // Tag needs to be unique so that previous mod does not get deleted
      tag: `${MODULE_NAME}_${tagNumber}`,
      src: buildGradle,
      newSrc: code,
      anchor: anchorRegex,
      // new line will be inserted right above matched anchor when 0
      offset: insertAbove ? 0 : 1,
      comment: "//",
    }).contents;
  } catch (e) {
    console.error(e);
    return buildGradle;
  }
};

export default withExpoProjectGradle;

Seems like rootProject.allProjects is not working correctly Gradle 8+ or might be another issue

Hello, would be also awesome if you could share the generated code inside "build" -directory, so would not need to setup module project to get generated code. As I would use the generated code inside my main apps plugin directory instead separate plugin.

simonitfi commented 1 year ago

So I managed this, and here if some one is interested:

  1. On main project add new folder on root called "plugin" if you don't already have.

  2. On plugin-folder add file named "notifee-fix-plugin.js" with following content: module.exports = require('./notifee-fix-files/withExpoProjectGradle')

  3. Create new folder inside plugin folder called "notifee-fix-files" and add following two files on that folder: "withExpoProjectGradle.d.ts" with content

import { ConfigPlugin } from "@expo/config-plugins"; declare const withExpoProjectGradle: ConfigPlugin<{} | void>; export default withExpoProjectGradle;

and file called "withExpoProjectGradle.js" with following content:

"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config_plugins_1 = require("@expo/config-plugins"); const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); const MODULE_NAME = "rn-project-build-gradle"; const notifeeImport =import java.nio.file.Paths; const notifeeFindNodeModulePath = def findNodeModulePath(baseDir, packageName) { def basePath = baseDir.toPath().normalize() // Node's module resolution algorithm searches up to the root directory, // after which the base path will be null while (basePath) { def candidatePath = Paths.get(basePath.toString(), "node_modules", packageName) if (candidatePath.toFile().exists()) { return candidatePath.toString() } basePath = basePath.getParent() } return null }

def notifeeDir = findNodeModulePath(projectDir, "@notifee/react-native") ?: "$rootDir/../node_modules/@notifee/react-native"; const notifeeCoreMavenUrl =maven { url "$notifeeDir/android/libs" } google(); const androidPlugin = (config, props) => { return (0, config_plugins_1.withProjectBuildGradle)(config, async ({ modResults, ...subConfig }) => { if (modResults.language !== "groovy") { config_plugins_1.WarningAggregator.addWarningAndroid("withExpoProjectGradle",Cannot automatically configure project build.gradle if it's not groovy); return { modResults, ...subConfig }; } // notifeeImport modResults.contents = await applyGradleMod(modResults.contents, notifeeImport, /buildscript(?:\s+)?\{/, true, 0); // notifeeFindNodeModulePath modResults.contents = await applyGradleMod(modResults.contents, notifeeFindNodeModulePath, /allprojects(?:\s+)?\{/, true, 1); // notifeeCoreMavenUrl const regex = /(?<=allprojects\s*{[\s\S]*repositories\s*{[\s\S]*?)google\(\)/g; modResults.contents = modResults.contents.replace(regex, notifeeCoreMavenUrl); return { modResults, ...subConfig }; }); }; const withExpoProjectGradle = (config, _props) => { const props = _props || {}; return (0, config_plugins_1.withPlugins)(config, [ [androidPlugin, new Map(Object.entries(props))], ]); }; const applyGradleMod = async (buildGradle, code, anchorRegex, insertAbove = false, tagNumber = 0) => { try { return (0, generateCode_1.mergeContents)({ // Tag needs to be unique so that previous mod does not get deleted tag:${MODULENAME}${tagNumber}, src: buildGradle, newSrc: code, anchor: anchorRegex, // new line will be inserted right above matched anchor when 0 offset: insertAbove ? 0 : 1, comment: "//", }).contents; } catch (e) { console.error(e); return buildGradle; } }; exports.default = withExpoProjectGradle;

  1. Finally add add plugin to app.json "plugins": [ "./plugins/notifee-fix-plugin" ]
mu29 commented 1 year ago

Or you can just use expo-build-properties as follows:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

Since my app is a monorepo configuration, the exact path may be different, but anyone can find the correct path by referring to the error message.

cgorrieri commented 1 year ago

Or you can just use expo-build-properties as follows:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

Since my app is a monorepo configuration, the exact path may be different, but anyone can find the correct path by referring to the error message.

This worked for me 👍

frozencap commented 1 year ago

Or you can just use expo-build-properties as follows:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

Since my app is a monorepo configuration, the exact path may be different, but anyone can find the correct path by referring to the error message.

did not work for me on fresh install

cgorrieri commented 1 year ago

Or you can just use expo-build-properties as follows:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

Since my app is a monorepo configuration, the exact path may be different, but anyone can find the correct path by referring to the error message.

did not work for me on fresh install

Try to run in verbose mode so it shows you the paths it is looking into for the maven repos. It is possible that the $rootDir/../../../node_modules might need some adjustments for your setup.

frozencap commented 1 year ago

it did work, had the wrong path. for those not in a monorepo, this is likely the path you're looking for

          android: {
            extraMavenRepos: [
              '../../node_modules/@notifee/react-native/android/libs',
            ],
          },

that being said, build times have more than doubled 😕

expected?

netorissi commented 1 year ago

Or you can just use expo-build-properties as follows:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

Since my app is a monorepo configuration, the exact path may be different, but anyone can find the correct path by referring to the error message.

Works for me tks 💪 But I edited the path to ../../node_modules/@notifee/react-native/android/libs

harisnaufal commented 1 year ago

It happened to me as well since I updated my Expo SDK to 49. Is anyone have a good solution for this? Thanks in advance.

github-actions[bot] commented 11 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Thanaen commented 11 months ago

The issue is not stale, it's still relevant

github-actions[bot] commented 10 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Iannery commented 10 months ago

This issue is still relevant.

Thanaen commented 10 months ago

I'm afraid that the maintainers of this library no longer have the time to spend on it 😅 Maybe it's time to turn to Expo Notifications (even though I preferred the Notifee API).

Note: this is of course not a criticism of the maintainers, who give a lot of their time to open source projects!

younes0 commented 9 months ago

@Thanaen not true: https://github.com/invertase/notifee/issues/899#issuecomment-1786199159

mikehardy commented 9 months ago

Thanks @younes0 and no offense taken @Thanaen - I do have plans on getting this repo all polished up in the short-term and Invertase in the medium- long-term has and does benevolently provide resources to do so

Still finishing up some urgent work in other repos to get things prepared for react-native 0.73 which is about to launch and requires some changes all over

younes0 commented 9 months ago

@shawarmaz the build times haven't changed on my side

Thanaen commented 9 months ago

@younes0 This seemed to be the case when I wrote this comment 28 days ago. 😄

@mikehardy Glad to hear you'll be able to spend some time on the project in the short term!

I was wondering, have you ever considered adding maintainers from outside Invertase to the project?

I've recently seen some authors of open source projects turn to solutions like https://polar.sh/ to fund the resolution of issues that would be considered important, do you think that this, combined with the addition of external contributors, could help you keep the project active in the longer term?

edwinvrgs commented 9 months ago

Or you can just use expo-build-properties as follows:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

Since my app is a monorepo configuration, the exact path may be different, but anyone can find the correct path by referring to the error message.

This also worked for me, just one thing, I'm using Solito and this is the path that worked for me:

$rootDir/../../../../../node_modules/@notifee/react-native/android/libs

omarhamedx commented 9 months ago

Or you can just use expo-build-properties as follows:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

Since my app is a monorepo configuration, the exact path may be different, but anyone can find the correct path by referring to the error message.

This also worked for me, just one thing, I'm using Solito and this is the path that worked for me:

$rootDir/../../../../../node_modules/@notifee/react-native/android/libs

where should i put this code in ?

edwinvrgs commented 9 months ago

@omarhamedx in the app.json or app.config.js. And remember to regenerate the android folder (you can do it by executing npx expo prebuild --clean).

younes0 commented 9 months ago

@omarhamedx the solution was already provided, please ask on Stack Overflow. Everytime someone ask for support on an issue that people/contributors follow, they get an email so imagine the spamming

github-actions[bot] commented 8 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Thanaen commented 8 months ago

This issue is still relevant

t0ma5h commented 8 months ago

Still relevant for me aswell.

firstpersoncode commented 7 months ago

Still relevant for me.. even with this config:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};

or this config:

const config = {
  expo: {
    // ...
    plugins: [
      [
        'expo-build-properties',
        {
          android: {
            extraMavenRepos: ['../../node_modules/@notifee/react-native/android/libs'],
          }
        },
      ],
    ],
  },
};
github-actions[bot] commented 6 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Thanaen commented 6 months ago

I don't think this issue is stale, it seems to me that you still need to use the tricks mentioned here to make it work

dbi75 commented 6 months ago

This worked for me, I had to remove $rootDir. Also note that you have to add the 'expo-build-properties' package to your project. I have a monorepo with the following structure:

project
   -> packages
       -> mobile-pwa
       -> mobile-app 
"plugins": [
 [
    "expo-build-properties",
    {
       "android": {
            "extraMavenRepos": ["../../../../node_modules/@notifee/react-native/android/libs"]
          }
      }
 ],
github-actions[bot] commented 4 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Thanaen commented 4 months ago

Still relevant

github-actions[bot] commented 3 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Thanaen commented 3 months ago

AFAIK it's still relevant

github-actions[bot] commented 2 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

effektsvk commented 2 months ago

I'm still having this issue as well. I'm currently on Expo 51. I tried the extraMavenRepos with a bunch of path variations, nothing worked.

For some reason, the docs on the website are outdated, they still mention adding @notifee/react-native as a plugin into app.json/app.config.js file but that's no longer the case here: https://github.com/invertase/notifee/blob/main/docs-react-native/react-native/docs/installation.md

effektsvk commented 2 months ago

Okay, I figured it out. The most important thing is to have the expo-build-properties as first plugin:

    "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "compileSdkVersion": 34,
            "targetSdkVersion": 34,
            "extraMavenRepos": [
              "$rootDir/../../../node_modules/@notifee/react-native/android/libs"
            ]
          }
        }
      ],
      "@config-plugins/detox"
    ]

I don't use a monorepo, so this path should work in most cases. I also needed to set versions to 34, because 33 won't compile due to some androidx dependencies.

chicomoedas2 commented 2 months ago

I am still getting this error, i did follow all the steps from expo upgrade helper and i did some modifications there, like delete some java files and added Kotlin instead, but i got the error that you mentioned up above, even when i added this code, didn't work,, is version 51 still with this error, and do you know any other alternatives to solve this?

"plugins": [ [ "expo-build-properties", { "android": { "compileSdkVersion": 34, "targetSdkVersion": 34, "extraMavenRepos": [ "$rootDir/../../../node_modules/@notifee/react-native/android/libs" ] } } ], "@config-plugins/detox" ]

effektsvk commented 2 months ago

@chicomoedas2 Did you run npx expo prebuild --clean? Make sure the command added that path to android/gradle.properties.

chicomoedas2 commented 2 months ago

@effektsvk Hi there,

I didn't, but how should looks my gradle.properties after this?

Now, i have all the lines with # (commented) except for this lines

org.gradle.jvmargs=-Xmx512m -XX:MaxMetaspaceSize=256m

android.useAndroidX=true

android.enableJetifier=true

reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64

newArchEnabled=false

hermesEnabled=true

expo.gif.enabled=true

expo.webp.enabled=true

expo.webp.animated=false

EX_DEV_CLIENT_NETWORK_INSPECTOR=true

expo.useLegacyPackaging=false

And, is that corret i add the '$rootDir/../../../node_modules/@notifee/react-native/android/libs' path inside android: {} on my app.config.js?

effektsvk commented 2 months ago

@chicomoedas2 It should have this line somewhere at the bottom:

android.extraMavenRepos=[{"url":"$rootDir/../../../node_modules/@notifee/react-native/android/libs"}]

But it should be added by the prebuild command, you (probably) should avoid making manual changes in the native projects and only use app.json to configure the prebuild command an then only run that.

chicomoedas2 commented 2 months ago

Okay, i'm gonna try again, executing the command

chicomoedas2 commented 2 months ago

Hello, thanks for your help folks, it did work, i just had to rebuild my android folder as you said.