Lg0gs / react-native-tiktok

MIT License
50 stars 33 forks source link

Android: build error #17

Closed supershik closed 1 year ago

supershik commented 1 year ago

Hello @Lg0gs Thank you for your great packages

I faced an issue while building on Android.

Task :app:processDebugMainManifest FAILED

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings 193 actionable tasks: 3 executed, 190 up-to-date E:\Work\tiktok\android\app\src\debug\AndroidManifest.xml:20:13-60 Error: Attribute provider#androidx.core.content.FileProvider@authorities value=(com.myapp.provider) from [:react-native-image-crop-picker] AndroidManifest.xml:20:13-60 is also present at [:react-native-tiktok] AndroidManifest.xml:25:13-64 value=(com.myapp.fileprovider). Suggestion: add 'tools:replace="android:authorities"' to element at AndroidManifest.xml:18:9-26:20 to override. E:\Work\tiktok\android\app\src\debug\AndroidManifest.xml:25:17-55 Error: Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/provider_paths) from [:react-native-image-crop-picker] AndroidManifest.xml:25:17-55
is also present at [:react-native-tiktok] AndroidManifest.xml:31:17-60 value=(@xml/file_provider_paths). Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml to override.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugMainManifest'.

    Manifest merger failed with multiple errors, see logs

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

2: Task failed with an exception.

  • What went wrong: java.lang.StackOverflowError (no error message)

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 22s

Any help is much appreciated

Lg0gs commented 1 year ago

@supershik Hi, do you use CLI or Android studio?

supershik commented 1 year ago

Yes. I used React Native CLI

I solved the issue. Deleted all data in <application> tag in node_modules/react-native-tiktok/android/src/main/AndroidManifest.xml

Here is AndroidManifest.xml I used.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.reactnativetiktok">
</manifest>

For now, it is working fine. I will close the issue.

Thanks again for your great library. @Lg0gs

Lg0gs commented 1 year ago

@supershik Good luck :))