zedlabs
zedlabs

Reputation: 523

android studio unable to find local maven repository

I placed the files of the repository in the .m2 folder but android studio is unable to resolve it

Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.redcpt:sdk:0.0.1

does anyone know what might be the issue

Upvotes: 1

Views: 3956

Answers (2)

Eeshvar Das
Eeshvar Das

Reputation: 11

Android Studio automatically places the Maven repositories in the correct location when you download them from Maven. There's no reason to go into any local maven folders.

Start a new project from scratch while connected online and see if that helps. You will be given updated options on dependencies sourced from Maven.

Upvotes: 0

Mark Rotteveel
Mark Rotteveel

Reputation: 108994

In the comments you mention "the structure of that folder is sdk -> 0.0.1 ->.pom, .jar, .aar files here.". That is the wrong location. A Maven dependency with coordinates com.redcpt:sdk:0.0.1 should be saved in .m2/repository/com/redcpt/sdk/0.0.1/.

It might be simpler to use Maven to install files into your local repository, see also How to add local jar files to a Maven project? (although I don't know what needs to be done to store the .aar file that way).

Upvotes: 2

Related Questions