【发布时间】:2015-11-05 08:48:05
【问题描述】:
我想将一个 jar 文件导入到我的 Android 项目中。(here is the jar file)
这是我的步骤:
在 MANIFEST.MF 文件中添加两行(Class-Path 和 Main-Class)
类路径:libs/nineoldandroids-2.4.0.jar
主类:com.demos.tencent_qq_ui.Aty.MainActivity将jar文件拖到libs目录下
右击“添加为库”
- 编辑我的 build.gradle 文件
依赖{
编译 fileTree(dir: 'libs', include: ['*.jar'])
编译'com.android.support:appcompat-v7:22.2.0'
编译文件('libs/nineoldandroids-2.4.0.jar')
}
重建项目 --> 运行
但出现错误:无法找到或加载主类com.demos.tencent_qq_ui.Aty.MainActivity
我google了很长时间,但没有得到太多有用的信息...
非常感谢您对我的错误的任何帮助。谢谢!
操作系统:ubuntu 15.04
IDE:Android Studio 1.2
【问题讨论】:
标签: java android eclipse maven android-studio