Reputation: 618
I want to be able to use a native library for example GLIDE in my flutter android project.
I have included gradle in the folder android/app/build.gradle
dependencies {
implementation fileTree(include: '*.aar', dir: 'libs')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.github.bumptech.glide:glide:3.5.2'
}
However when i run ./gradlew build
command it doesn't compile GLIDE, in addition when i go into the java folder android/src/main/java ManActivity.java
i try to type in Glide but it remains unresolved method.
please help.
Upvotes: 2
Views: 18058
Reputation: 240
As you can see from this question: Calling native libraries in Flutter using Platform Channels you will have to create a new plugin project with the specific library you want. However as @dr3k said you can just use the flutter image widget.
Upvotes: 1