Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Deprecated API warnings and AndroidManifest issues during build #3324

Open
5 tasks done
nizzy91 opened this issue Dec 8, 2024 · 1 comment
Open
5 tasks done
Labels
🔧 build error Issue is related to building VisionCamera in your project

Comments

@nizzy91
Copy link

nizzy91 commented Dec 8, 2024

How were you trying to build the app?

I am building the app using the Expo CLI with the expo run:android. The build completes successfully, but the following warnings are displayed. I can build example apps as well as my project app with the same warnings. Seems like worklets cause the warnings.

Full build logs

 Building app...
Starting a Gradle Daemon (subsequent builds will be faster)
Configuration on demand is an incubating feature.

> Configure project :expo

Using expo modules
  - expo-asset (11.0.1)
  - expo-blur (14.0.1)
  - expo-constants (17.0.3)
  - expo-crypto (14.0.1)
  - expo-file-system (18.0.4)
  - expo-font (13.0.1)
  - expo-haptics (14.0.0)
  - expo-keep-awake (14.0.1)
  - expo-linking (7.0.3)
  - expo-localization (16.0.0)
  - expo-modules-core (2.1.1)
  - expo-splash-screen (0.29.13)
  - expo-system-ui (4.0.5)
  - expo-web-browser (14.0.1)

> Configure project :react-native-mmkv
[react-native-mmkv] Thank you for using react-native-mmkv ??
[react-native-mmkv] If you enjoy using react-native-mmkv, please consider sponsoring this project: https://github.com/sponsors/mrousavy 

> Configure project :react-native-reanimated
Android gradle plugin: 8.6.0
Gradle: 8.10.2

> Configure project :react-native-vision-camera
[VisionCamera] Thank you for using VisionCamera ??
[VisionCamera] If you enjoy using VisionCamera, please consider sponsoring this project: https://github.com/sponsors/mrousavy
[VisionCamera] node_modules found at C:\path\to\project\node_modules
[VisionCamera] VisionCamera_enableFrameProcessors is set to true!
[VisionCamera] react-native-worklets-core found, Frame Processors are enabled!
[VisionCamera] VisionCamera_enableCodeScanner is set to false!

> Task :react-native-vision-camera:generateCodegenSchemaFromJavaScript
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.

> Task :react-native-worklets-core:processDebugManifest
package="com.worklets" found in source AndroidManifest.xml: C:\path\to\project\node_modules\react-native-worklets-core\android\src\main\AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.     
Recommendation: remove package="com.worklets" from the source AndroidManifest.xml: C:\path\to\project\node_modules\react-native-worklets-core\android\src\main\AndroidManifest.xml.

> Task :app:processDebugMainManifest
C:\path\to\project\android\app\src\debug\AndroidManifest.xml:6:5-162 Warning:
        application@android:usesCleartextTraffic was tagged at AndroidManifest.xml:6 to replace other declarations but no other declaration present
C:\path\to\project\android\app\src\debug\AndroidManifest.xml Warning:
        provider#expo.modules.filesystem.FileSystemFileProvider@android:authorities was tagged at AndroidManifest.xml:0 to replace other declarations but no other declaration present

> Task :react-native-worklets-core:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :react-native-vision-camera:configureCMakeDebug[x86_64]
C/C++: VisionCamera: Frame Processors: ON!
C/C++: VisionCamera: Linking react-native-worklets...

> Task :react-native-vision-camera:compileDebugKotlin
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/utils/CamcorderProfileUtils.kt:71:42 'get(Int, Int): CamcorderProfile!' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/utils/CamcorderProfileUtils.kt:96:42 'get(Int, Int): CamcorderProfile!' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/utils/CamcorderProfileUtils.kt:121:42 'get(Int, Int): CamcorderProfile!' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt:33:56 'getter for jsCallInvokerHolder: CallInvokerHolder' is deprecated. Use ReactContext.getJSCallInvokerHolder instead
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:4:34 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:31:5 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:32:45 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:33:47 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:34:43 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:35:43 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:36:43 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:37:41 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:38:47 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:39:50 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:40:50 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:41:60 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:42:61 'MapBuilder' is deprecated. Deprecated in Java
w: file:///C:/path/to/project/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraViewManager.kt:43:47 'MapBuilder' is deprecated. Deprecated in Java

Project dependencies

"dependencies": {
    "@expo-google-fonts/poppins": "^0.2.3",
    "@expo/vector-icons": "^14.0.2",
    "@react-navigation/bottom-tabs": "^7.0.0",
    "@react-navigation/native": "^7.0.0",
    "expo": "~52.0.11",
    "expo-blur": "~14.0.1",
    "expo-constants": "~17.0.3",
    "expo-crypto": "~14.0.1",
    "expo-font": "~13.0.1",
    "expo-haptics": "~14.0.0",
    "expo-linking": "~7.0.3",
    "expo-localization": "~16.0.0",
    "expo-router": "~4.0.9",
    "expo-splash-screen": "~0.29.13",
    "expo-status-bar": "~2.0.0",
    "expo-symbols": "~0.2.0",
    "expo-system-ui": "~4.0.4",
    "expo-web-browser": "~14.0.1",
    "i18n-js": "^4.5.0",
    "nativewind": "^4.1.23",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "0.76.3",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-mmkv": "^3.1.0",
    "react-native-reanimated": "~3.16.1",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "^4.3.0",
    "react-native-vision-camera": "^4.6.3",
    "react-native-web": "~0.19.13",
    "react-native-webview": "13.12.2",
    "react-native-worklets-core": "^1.5.0",
    "tailwindcss": "^3.4.15"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@types/jest": "^29.5.12",
    "@types/react": "~18.3.12",
    "@types/react-test-renderer": "^18.3.0",
    "jest": "^29.2.1",
    "jest-expo": "~52.0.2",
    "react-test-renderer": "18.3.1",
    "reactotron-react-native": "^5.1.10",
    "reactotron-react-native-mmkv": "^0.2.7",
    "typescript": "^5.3.3"
  },

VisionCamera Version

4.6.3

Target platforms

Android

Operating system

Windows

Can you build the VisionCamera Example app?

Yes, I can successfully build the Example app here

Additional information

@nizzy91 nizzy91 added the 🔧 build error Issue is related to building VisionCamera in your project label Dec 8, 2024
Copy link

maintenance-hans bot commented Dec 8, 2024

Guten Tag, Hans here! 🍻

Thanks for detailed report. It seems you are getting deprecated API warnings during your build, which is not uncommon when using libraries that haven’t updated yet.

To address your AndroidManifest issue, it's a recommendation to remove the deprecated package="com.worklets" from your AndroidManifest.xml file. As for ze deprecation warnings from Java, make sure to check if updates are available for the libraries mentioned in the logs. If you find issues with specific libraries, you might also consider reaching out to ze maintainers.

If this doesn't resolve your problem, or you notice any runtime issues, please provide additional logs from adb logcat so mrousavy can investigate further. Also, if you find ze project helpful, consider sponsoring mrousavy to support ongoing development!

Keep us updated!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 build error Issue is related to building VisionCamera in your project
Projects
None yet
Development

No branches or pull requests

1 participant