无法在android studio中导入库项目 [英] unable to import library project in android studio

查看:118
本文介绍了无法在android studio中导入库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经修改了finestwebview的库项目,此处

I have modified library project of finestwebview here

我试图将此库项目添加到我的android studio项目中,但遇到一些错误,提示未找到名称为'default'的配置.android studio.需要帮助.我一整天都在浪费时间,但是无法添加.

I tried to add this library project in to my android studio's project but I got several errors saying configuration with name 'default' not found android studio.need help. I wasted my 1 whole days trying this but unable to add.

我尝试过的是

我将库项目复制到根项目的libs文件夹中,并在setting.gradle文件中添加了'include:libs:finestwebview'.

I copied the library project into the libs folder of my root project,and added 'include:libs:finestwebview' in setting.gradle file.

也要

文件->项目结构-> app->依赖项

file->project structure->app->dependencies

添加了模块并同步了项目,但无法达到预期的结果.

added the module and sync the project but cannot achieve the desired outcome.

推荐答案

您要包含一个项目,因此您应该将其添加为模块,并在应用的gradle依赖项中说编译项目"以​​在应用模块中使用它

You are including a project, so for that you should add it as a module, and say compile project in your app's gradle dependencies to use it in your app module.

转到File-> New-> Import模块并添加您的库项目文件夹

go to File->New->Import module and add your library project folder

您将不得不在此处命名您的图书馆项目那么您需要说

you will have to name your library project there then you need to say

`compile project(':yourlibraryProjectname')` 

在gradle依赖中

这篇关于无法在android studio中导入库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆