Android studio 在Android Studio的lib中反编译自生成的jar
我已经使用swagger codegen生成了一个jar,并将其放置在Android studio中我的应用程序的Android studio 在Android Studio的lib中反编译自生成的jar,android-studio,Android Studio,我已经使用swagger codegen生成了一个jar,并将其放置在Android studio中我的应用程序的lib文件夹中。它没有被反编译,也就是说,我不能在这里看到我的jar的类。 我已尝试使缓存无效/重新启动。它以前有时奏效。 但它已经不起作用了。任何帮助都将不胜感激。您的构建中可能缺少。gradle类似于: apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' apply
lib
文件夹中。它没有被反编译,也就是说,我不能在这里看到我的jar的类。
我已尝试使缓存无效/重新启动。它以前有时奏效。
但它已经不起作用了。任何帮助都将不胜感激。您的
构建中可能缺少。gradle
类似于:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'com.github.triplet.play'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.prototype"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
testCoverageEnabled = false
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:1.10.19"
testCompile 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:0.31'
}
以下几点对我很有用:
是安卓项目吗?您使用的构建工具是什么?我在build.gradle中添加了compile fileTree(dir:'libs',include:['*.jar']),同步后您还没有看到库?不,我无法看到它。我已经在que中插入了上面的快照。您可以共享您的
build.gradle
?同样的配置也适用于我,我可以看到jar内容,但我看不出有任何错误。因此,我将删除我的答案,因为它没有帮助
compile files('libs/your-jar-filename.jar')