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

Support for AGP 8 #18

Open
sneglia9191 opened this issue May 20, 2024 · 6 comments
Open

Support for AGP 8 #18

sneglia9191 opened this issue May 20, 2024 · 6 comments

Comments

@sneglia9191
Copy link

Getting this issue when building after upgrading to AGP 8+:

Incorrect package="com.gabriel.terwesten.iabtcf_consent_info" found in source AndroidManifest.xml: /Users/sneglia/.pub-cache/hosted/pub.dev/iabtcf_consent_info-3.1.0/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.gabriel.terwesten.iabtcf_consent_info" from the source AndroidManifest.xml: /Users/sneglia/.pub-cache/hosted/pub.dev/iabtcf_consent_info-3.1.0/android/src/main/AndroidManifest.xml.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':iabtcf_consent_info:processDebugManifest'.

A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction
Incorrect package="com.gabriel.terwesten.iabtcf_consent_info" found in source AndroidManifest.xml: /Users/sneglia/.pub-cache/hosted/pub.dev/iabtcf_consent_info-3.1.0/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.gabriel.terwesten.iabtcf_consent_info" from the source AndroidManifest.xml: /Users/sneglia/.pub-cache/hosted/pub.dev/iabtcf_consent_info-3.1.0/android/src/main/AndroidManifest.xml.

@storeIt
Copy link

storeIt commented Jun 17, 2024

You could fix this issue with deletion of the package line in AndroidManifest. Delete this: 'package="com.gabriel.terwesten.iabtcf_consent_info' and you will have an empty manifest tag like: '
'.

@osmanozturk
Copy link

Doing that is not enough, it still complains about the namespace even if you add the main gradle fix and kotlin version. Library needs an update for AGP 8

@large
Copy link

large commented Jul 16, 2024

It does not only concern this package, but here is a hack to handle all packages that has not yet upgraded to AGP 8.x, add this to the allprojects part in your build.gradle (android):

allprojects {
    afterEvaluate { project ->
        if (project.hasProperty('android')) {
            project.android {
                if (namespace == null) {
                    namespace project.group
                }
            }
        }
    }
}

This project should though be upgraded so it is compilled with Java 17 and not 1.8 which current version is setup todo.

@osmanozturk
Copy link

It does not only concern this package, but here is a hack to handle all packages that has not yet upgraded to AGP 8.x, add this to the allprojects part in your build.gradle (android):

allprojects {
    afterEvaluate { project ->
        if (project.hasProperty('android')) {
            project.android {
                if (namespace == null) {
                    namespace project.group
                }
            }
        }
    }
}

This project should though be upgraded so it is compilled with Java 17 and not 1.8 which current version is setup todo.

That's what I meant by gradle fix but that didn't work out for me either. I will recheck the Java 17 part

@egonbeermat
Copy link

This is an incredibly useful package, but as the Flutter package ecosystem is gradually upgrading AGP, this package is in danger of gating that, by becoming stale. The above allprojects addition wasn't enough for me to move forward. It would be great if the author could resolve themselves / review the proposed PR for this fix, and move forward! Keep up the good work!

@osmanozturk
Copy link

I second that

This is an incredibly useful package, but as the Flutter package ecosystem is gradually upgrading AGP, this package is in danger of gating that, by becoming stale. The above allprojects addition wasn't enough for me to move forward. It would be great if the author could resolve themselves / review the proposed PR for this fix, and move forward! Keep up the good work!

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

5 participants