question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please help error when adding "module contains the YouTube Player."

See original GitHub issue

hi there!

Operation steps:

  1. New Project…
  2. Open file build.gradle (Module: app) add line implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:10.0.3'
  • Sync Now OK
  • Run error Task :app:processDebugManifest FAILED C:\Users\Administrator\AndroidStudioProjects\MyApplication2\app\src\main\AndroidManifest.xml:22:18-91 Error: Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override. FULL CODE FILE `apply plugin: ‘com.android.application’

android { compileSdkVersion 28 defaultConfig { applicationId “com.apptest.myapplication” minSdkVersion 17 targetSdkVersion 28 versionCode 1 versionName “1.0” testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner” } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’ } } }

dependencies { implementation fileTree(dir: ‘libs’, include: [‘*.jar’]) implementation ‘com.android.support:appcompat-v7:28.0.0’ implementation ‘com.android.support.constraint:constraint-layout:1.1.3’ testImplementation ‘junit:junit:4.12’ androidTestImplementation ‘com.android.support.test🏃1.0.2’ androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’ implementation ‘com.pierfrancescosoffritti.androidyoutubeplayer:core:10.0.3’ } `

3.Fix code add line tools:replace="android:appComponentFactory" android:appComponentFactory="@string/app_name"

FULL CODE FILE

<? xml version="1.0" encoding="utf-8"?>

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

<application
    tools:replace="android:appComponentFactory"
    android:appComponentFactory="@string/app_name"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
</manifest>
  1. Running the application continues the error `* What went wrong: Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug’.

More than one file was found with OS independent path ‘META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version’`

Hope everyone can help

Best regards

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kenmobicommented, Apr 22, 2019

The library doesn’t work with android support libraries, you need to use androidX library. You can easily migrate the project by clicking Refactor > Migrate to Android X in menu bar. You can have additional reading on this topic following this link here: https://developer.android.com/jetpack/androidx/migrate If you still need help I can update your gradle file to androidX once I am at my computer again (currently on mobile). Am 22.04.2019 um 02:32 schrieb kenmobi @.>: Are you using androidX? … Am 21.04.2019 um 14:10 schrieb kenmobi @.>: I created a new project and added the library (com.pierfrancescosoffritti.androidyoutubeplayer: core: 10.0.3) to the project and made the above error. If you need I will send the project to you Thank you for responding — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread. I only created 1 new project and only added the “implementation ‘com.pierfrancescosoffritti.androidyoutubeplayer: core: 10.0.3’” " when i remove “implementation ‘com.pierfrancescosoffritti.androidyoutubeplayer: core: 10.0.3’” the project works normally FULL CODE apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.apptest.myapplication" minSdkVersion 17 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test🏃1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' //implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:10.0.3' } Thank you. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

the project works perfectly: D Thanks for the answer!

@ PierfrancescoSoffritti thanks

1reaction
hannojgcommented, Apr 22, 2019

The library doesn’t work with android support libraries, you need to use androidX library.

You can easily migrate the project by clicking Refactor > Migrate to Android X in menu bar.

You can have additional reading on this topic following this link here: https://developer.android.com/jetpack/androidx/migrate

If you still need help I can update your gradle file to androidX once I am at my computer again (currently on mobile).

Am 22.04.2019 um 02:32 schrieb kenmobi notifications@github.com:

Are you using androidX? … Am 21.04.2019 um 14:10 schrieb kenmobi @.***>: I created a new project and added the library (com.pierfrancescosoffritti.androidyoutubeplayer: core: 10.0.3) to the project and made the above error. If you need I will send the project to you Thank you for responding — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

I only created 1 new project and only added the “implementation ‘com.pierfrancescosoffritti.androidyoutubeplayer: core: 10.0.3’” "

when i remove “implementation ‘com.pierfrancescosoffritti.androidyoutubeplayer: core: 10.0.3’” the project works normally

FULL CODE `apply plugin: ‘com.android.application’

android { compileSdkVersion 28 defaultConfig { applicationId “com.apptest.myapplication” minSdkVersion 17 targetSdkVersion 28 versionCode 1 versionName “1.0” testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner” } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’ } }

}

dependencies { implementation fileTree(dir: ‘libs’, include: [‘*.jar’]) implementation ‘com.android.support:appcompat-v7:28.0.0’ implementation ‘com.android.support.constraint:constraint-layout:1.1.3’ testImplementation ‘junit:junit:4.12’ androidTestImplementation ‘com.android.support.test🏃1.0.2’ androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’ //implementation ‘com.pierfrancescosoffritti.androidyoutubeplayer:core:10.0.3’ } ` Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XCode 8.2.1 error - No such module YouTubePlayer
I downloaded the latest release and created the youTubePlayer framework and linked it to a sample app and able to import it. Please...
Read more >
YouTube Player API Reference for iframe Embeds
The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript. Using the API's...
Read more >
How to fix 'Module not found: Can't resolve 'http' in ... - YouTube
Basically, just change 'react-scripts' to 4.0.2 in your package.json and run `npm install` again :D Follow me on Twitter: ...
Read more >
Content - Add a Module - Instructor - YouTube
For questions regarding Brightspace, visit https://community.brightspace.com. Structure and organize your content by adding modules and ...
Read more >
Adding menus and modules to the application navigator
Shows how to add application menus and modules to the application navigator. This video applies to UI16, the latest version of the user ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found