I am currently using the libraries from this repository in my application.
I want to make some changes to the library, so I downloaded the repository, imported the modules inside Android Studio, and updated the settings.gradle and build.gradle files to include the local modules and remove the remote ones.
However, when syncing my project I am getting warnings that all of the new modules failed to resolve. As a result, I cannot run my application.
Here is what I did in detail:
Before changing anything, my build.gradle file dependencies where as follows:
Код: Выделить всё
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'io.github.oneuiproject.sesl:appcompat:1.4.0'
implementation 'io.github.oneuiproject.sesl:coordinatorlayout:1.0.0'
implementation 'io.github.oneuiproject.sesl:drawerlayout:1.0.0'
implementation 'io.github.oneuiproject.sesl:preference:1.1.0'
implementation 'io.github.oneuiproject.sesl:recyclerview:1.4.1'
implementation 'io.github.oneuiproject.sesl:swiperefreshlayout:1.0.0'
implementation 'io.github.oneuiproject.sesl:viewpager:1.1.0'
implementation 'io.github.oneuiproject.sesl:viewpager2:1.1.0'
implementation 'io.github.oneuiproject.sesl:material:1.5.0'
implementation 'io.github.oneuiproject.sesl:apppickerview:1.0.0'
implementation 'io.github.oneuiproject.sesl:indexscroll:1.0.3'
implementation 'io.github.oneuiproject.sesl:picker-basic:1.2.0'
implementation 'io.github.oneuiproject.sesl:picker-color:1.1.0'
implementation 'io.github.oneuiproject:design:1.2.6'
}
- core
- customview
- drawerlayout
- fragment
- viewpager
I add the following to my settings.gradle:
Код: Выделить всё
include ':app'
include ':appcompat'
include ':core'
include ':drawerlayout'
include ':customview'
include ':fragment'
include ':viewpager'
Код: Выделить всё
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// implementation 'io.github.oneuiproject.sesl:appcompat:1.4.0'
implementation 'io.github.oneuiproject.sesl:coordinatorlayout:1.0.0'
// implementation 'io.github.oneuiproject.sesl:drawerlayout:1.0.0'
implementation 'io.github.oneuiproject.sesl:preference:1.1.0'
implementation 'io.github.oneuiproject.sesl:recyclerview:1.4.1'
implementation 'io.github.oneuiproject.sesl:swiperefreshlayout:1.0.0'
// implementation 'io.github.oneuiproject.sesl:viewpager:1.1.0'
implementation 'io.github.oneuiproject.sesl:viewpager2:1.1.0'
implementation 'io.github.oneuiproject.sesl:material:1.5.0'
implementation 'io.github.oneuiproject.sesl:apppickerview:1.0.0'
implementation 'io.github.oneuiproject.sesl:indexscroll:1.0.3'
implementation 'io.github.oneuiproject.sesl:picker-basic:1.2.0'
implementation 'io.github.oneuiproject.sesl:picker-color:1.1.0'
implementation ':appcompat'
implementation ':core'
implementation ':drawerlayout'
implementation ':customview'
implementation ':fragment'
implementation ':viewpager'
}
-
Add the manifest.gradle that is found in the root of the repository to the root of the module folder and add to the build.gradle file in the root of the module folder. I did this because I was getting errors since the build.gradle file refers variables that are in manifest.gradle.
Код: Выделить всё
apply from: 'manifest.gradle' -
I was getting errors that a namespace must be declared in build.gradle. So for each build.gradle in the root of the module folder I added in the android block. Not sure if I used the correct package name here.
Код: Выделить всё
namespace 'com.myapp'
Источник: https://stackoverflow.com/questions/781 ... dependency
Мобильная версия