作者:会员WWW | 来源:互联网 | 2023-05-18 15:26
我已经开始使用Android Studio并遇到了问题.我似乎没有弄清楚为什么在我的项目中添加库时看不到Add as Library选项.
我为了添加库而执行的步骤:
*在app存储库中的libs文件夹中添加库.
*右键单击以查看" 添加为库"选项.(看不到它!)
*由于上面的步骤不起作用,我想到将库直接添加到libs文件夹中,即在Explorer中.失败!
因此,我无法继续我的项目.
PS:我已经删除了Eclipse,我不想安装再次进行设置.
build.gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.team1cloud.cloudapp"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies
{
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.apis:google-api-services-drive:v2-rev161-1.19.1'
compile files('libs/commons-logging-1.1.1.jar')
compile files('libs/google-api-client-1.18.0-rc.jar')
compile files('libs/google-api-client-android-1.18.0-rc.jar')
compile files('libs/google-api-client-appengine-1.18.0-rc.jar')
compile files('libs/google-api-client-gson-1.18.0-rc.jar')
compile files('libs/google-api-client-jackson2-1.18.0-rc.jar')
compile files('libs/google-api-client-java6-1.18.0-rc.jar')
compile files('libs/google-api-client-protobuf-1.18.0-rc.jar')
compile files('libs/google-api-client-servlet-1.18.0-rc.jar')
compile files('libs/google-api-client-xml-1.18.0-rc.jar')
compile files('libs/google-http-client-1.18.0-rc.jar')
compile files('libs/google-http-client-android-1.18.0-rc.jar')
compile files('libs/google-http-client-appengine-1.18.0-rc.jar')
compile files('libs/google-oauth-client-java6-1.18.0-rc.jar')
compile files('libs/google-oauth-client-jetty-1.18.0-rc.jar')
compile files('libs/google-oauth-client-servlet-1.18.0-rc.jar')
compile files('libs/google-play-services.jar')
compile files('libs/gson-2.1.jar')
compile files('libs/httpclient-4.0.1.jar')
compile files('libs/httpcore-4.0.1.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')
compile files('libs/jdo2-api-2.3-eb.jar')
compile files('libs/jetty-6.1.26.jar')
compile files('libs/jetty-util-6.1.26.jar')
compile files('C:/Users/sjeet/AndroidStudioProjects/CloudApp/gradle/wrapper/gradle-wrapper.jar')
}
谢谢.请帮忙!!!