floatinghotpot / cordova-plugin-facebookads

Cordova/PhoneGap plugin for Facebook Audience Network Ads
64 stars 71 forks source link

phonegap build error #68

Open pearlwebsolution opened 6 years ago

pearlwebsolution commented 6 years ago

while building app through adobe phonegap so error. Error details below

Build Date: 2017-07-29 05:55:21 +0000
Subproject Path: CordovaLib
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
...
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0-alpha1) from [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38
    is also present at [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 value=(25.3.1).
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:41 to override.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
blukis commented 6 years ago

I'm having the same problem. It seems this is caused by a recent change in PhoneGap build, because the same config.xml built fine for me a few days ago. Maybe this can be fixed in the plugin tho?

My build log, and a simple failing .zip attached. build-log.txt www.zip

Update: I opened a similar question on the PhoneGap build side - honestly not sure where the issue is, actually.

ghost commented 6 years ago

We are getting the same error

mergeReleaseResources :processReleaseManifest/project/AndroidManifest.xml:27:9-38 Error: Attribute meta-data#android.support.VERSION@value value=(26.0.0-alpha1) from [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38 is also present at [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 value=(25.3.1). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:41 to override.

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

:processReleaseManifest FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

W1ldW1ngs commented 6 years ago

@floatinghotpot any insight on what could be causing this?

pearlwebsolution commented 6 years ago

@floatinghotpot any insight on what could be causing this?

hello sir, from this month 2nd onwards Adobe Phonegap changes its version and building method. After that, this build error problem starts. Please try to resolve it.

W1ldW1ngs commented 6 years ago

@pearlwebsolution

We are still trying a way to get this plugin working, but only keep running into roadblocks. Hopefully @floatinghotpot answers soon.

W1ldW1ngs commented 6 years ago

Any updates on this? We haven't tried it since.

pearlwebsolution commented 6 years ago

sir @floatinghotpot , are you are still maintaining this plugin? Many of we waiting for your reply...

W1ldW1ngs commented 6 years ago

This is by far the best plugin if we can get it to work inside of our app in order to deliver backfill inside of our feed scroller app.

At this point this was the only facebook audience network plugin I could find, hopefully it gets patched soon.

W1ldW1ngs commented 6 years ago

HUGE news @pearlwebsolution and @blukis we were able to finally get this plugin to build after also picking up this plugin.

https://www.npmjs.com/package/cordova-android-support-gradle-release

Hope it helps anyone running into this problem! :)

pearlwebsolution commented 6 years ago

hi friends, As @W1ldW1ngs idea, i used https://www.npmjs.com/package/cordova-android-support-gradle-release , its work for me. working fine. Thanks @W1ldW1ngs .

We are highly thankful to Mr. @floatinghotpot for created this plugin.

But i highly disappointed for till now no response from Mr. @floatinghotpot .

Will he maintain this plugin? This question ariased on me due to not answering for this issue.

W1ldW1ngs commented 6 years ago

That I'm not sure I but I am hopeful that this plugin will be maintained as this is the only plugin we have found that allows us to run native ads in our app.

floatinghotpot commented 6 years ago

The plugin itself is under maintain, but I found it's a quite common issue for project dependent on android support library.

To avoid using another plugin to fix it, I just create a patch version to fix the issue.

Just like cordova-android-support-gradle-release does, insert a gradle file into the project with following content:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '25.+'
            }
        }
    }
}