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

Error with version 0.6.1 #817

Open
rlee1990 opened this issue Dec 30, 2024 · 12 comments
Open

Error with version 0.6.1 #817

rlee1990 opened this issue Dec 30, 2024 · 12 comments
Assignees

Comments

@rlee1990
Copy link

I am not receiving an error when using the below error when trying to run the app on android:

Incorrect package="com.example.stream_video_push_notification" found in source AndroidManifest.xml: /Users/rickeylee/.pub-cache/hosted/pub.dev/stream_video_push_notification-0.6.1/android/src/main/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
Recommendation: remove package="com.example.stream_video_push_notification" from the source AndroidManifest.xml: /Users/rickeylee/.pub-cache/hosted/pub.dev/stream_video_push_notification-0.6.1/android/src/main/AndroidManifest.xml.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':stream_video_push_notification:processDebugManifest'.
> A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction
   > Incorrect package="com.example.stream_video_push_notification" found in source AndroidManifest.xml: /Users/rickeylee/.pub-cache/hosted/pub.dev/stream_video_push_notification-0.6.1/android/src/main/AndroidManifest.xml.
     Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
     Recommendation: remove package="com.example.stream_video_push_notification" from the source AndroidManifest.xml: /Users/rickeylee/.pub-cache/hosted/pub.dev/stream_video_push_notification-0.6.1/android/src/main/AndroidManifest.xml.
@Brazol Brazol self-assigned this Dec 30, 2024
@rmahmadkhan
Copy link

rmahmadkhan commented Dec 30, 2024

I am facing the same issue with 0.6.1 while trying to run on android. Flutter version 3.27.1.
I wonder why a new version is not fully tested :(

@Brazol
Copy link
Contributor

Brazol commented Dec 30, 2024

Hey @rlee1990 and @rmahmadkhan, I'm sorry for your bad experience. You are probably facing this issue because you are using Gradle 8, and we are not yet compatible with it.

I'm currently working on AGP 8 support and will prepare the new release as soon as it is ready. There are still some dependencies with packages that do not support it, but I am actively addressing this issue.

I appreciate your patience as we work through this, thank you :)

@rmahmadkhan
Copy link

@Brazol yeah, right. We are using Gradle 8.5 in the project. But we are not able to use Gradle 7 with latest flutter version. Can't roll back either now :(

@Brazol
Copy link
Contributor

Brazol commented Dec 31, 2024

You should be able to use Gradle 7 if you set compileSdkVersion to 34. It defaults to 35 in Flutter 3.27.1 if you are using flutter gradle parameters.

@rmahmadkhan
Copy link

rmahmadkhan commented Dec 31, 2024

I changed the compileSdkVersion to 34 and also changed the gradle version to 7.6 in gradle-wrapper.properties but still facing the same issue on flutter run. can you elaborate more on your suggestion?

@rlee1990
Copy link
Author

@Brazol downgrading on Android isn't an option for me at this time. Do we have a timeframe on this issue?

@rmahmadkhan
Copy link

@rlee1990 did you manage to run the app?
also, @Brazol any update from your side?

@Brazol
Copy link
Contributor

Brazol commented Jan 2, 2025

AGP compatibility work is done in this PR. I can't merge it yet because the flutter_callkit_incoming dependency is still causing issues when using Gradle 8. If you can't wait for the new release from our side, you can try using that branch version in your app, together with a fixed flutter_callkit_icoming version from this PR.

You can do this with dependency_overrides like this:

dependency_overrides:
  stream_video:
    git:
      url: https://github.com/GetStream/stream-video-flutter
      path: packages/stream_video
      ref: chore/AGP-8-compatibility
  stream_video_flutter:
    git:
      url: https://github.com/GetStream/stream-video-flutter
      path: packages/stream_video_flutter
      ref: chore/AGP-8-compatibility
  stream_video_push_notification:
    git:
      url: https://github.com/GetStream/stream-video-flutter
      path: packages/stream_video_push_notification
      ref: chore/AGP-8-compatibility
  flutter_callkit_incoming:
    git:
      url: https://github.com/iamriajul/flutter_callkit_incoming
      ref: patch-1

This is, of course, a temporary solution until we release a new version. Please let me know if this works for you.

@rmahmadkhan
Copy link

rmahmadkhan commented Jan 3, 2025

Just putting this here for others...

Faced this issue after using the above dependency_overrides. I guess it is due to my M1 Mac.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':flutter_callkit_incoming:bundleLibCompileToJarDebug'.
> Could not create task ':flutter_callkit_incoming:compileDebugJavaWithJavac'.
   > Failed to calculate the value of task ':flutter_callkit_incoming:compileDebugJavaWithJavac' property 'javaCompiler'.
      > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
         > No locally installed toolchains match and toolchain download repositories have not been configured.

I had to download and install AArch64 JDK. Check the StackOverFlow solution

@rlee1990
Copy link
Author

rlee1990 commented Jan 7, 2025

I get the same error as @rmahmadkhan @Brazol

@rlee1990
Copy link
Author

rlee1990 commented Jan 8, 2025

@rmahmadkhan so I did the steps from this below and it now works:

This error indicates that Gradle cannot find a compatible Java 17 installation on your Mac with Apple Silicon (aarch64) processor. Let me help you resolve this.

Here are the steps to fix this:

1. First, install Java 17 for ARM64 Mac. You can do this in several ways:

   ```bash
   # Using Homebrew
   brew install openjdk@17

   # Or using SDKMan
   sdk install java 17.0.9-tem
  1. After installation, you need to make sure the Java installation is properly linked. If you used Homebrew, run:

    sudo ln -sfn $(brew --prefix)/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
  2. Verify the installation:

    java -version
  3. In your project's gradle.properties file, you might want to explicitly set the Java home path:

    org.gradle.java.home=/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home

If you're still having issues after following these steps, you can try:

  1. Cleaning your Gradle cache:

    ./gradlew cleanBuildCache
  2. Invalidating your IDE caches and restarting

Would you like me to clarify any of these steps?

@rlee1990
Copy link
Author

rlee1990 commented Jan 8, 2025

After I ran this flutter config --jdk-dir= normally this /Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants