* .aidl文件出现在Android Studio中解压缩的APK版本的文件夹中是否正常? [英] Is it normal that the *.aidl files appeared in the folder of the unzipped apk build within Android Studio
问题描述
我在源代码中使用了辅助文件,但与代码库下的apk构建相比,Andorid Studio中的一个构建具有包含.aidl文件的额外文件夹.那是正常的吗?这些* .aidl文件是否应该包装在classes.dex?(或resources.arsc?)中? 我也曾尝试使用
I used aidl files in my source codes, but compare to the apk build under code base, the one build within Andorid Studio has extra folder that contains .aidl files. Is that normal? Shouldn't these *.aidl files be wrapped in classes.dex?(or resources.arsc?) I also had tried to use
packagingOptions {
exclude './src/com/mytest/test/*.aidl'
}
但是它不起作用! 以下是我的build.gradle:
but it doesn't work! following is my build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
repositories {
jcenter()
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.mytest.test"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1"
}
buildTypes {
release {
minifyEnabled true
proguardFiles 'proguard-apk.config'
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
//androidTest.setRoot('../tests')
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude './src/com/mytest/test/*.aidl'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
推荐答案
似乎已经过去了很长时间,我仍然想发表文章来帮助您. 我遇到了同样的问题,我解决了! 尝试删除 resources.srcDirs = ['src'] 在你的build.gradle中 这表明Java资源不是android资源,res已经表明android资源
Thought it seems passed a long time, I still want to post to help you. I met the same problem, I resolved it! try to remove resources.srcDirs = ['src'] in you build.gradle this indicate java resource not android resource, the res already indicate android resource
这篇关于* .aidl文件出现在Android Studio中解压缩的APK版本的文件夹中是否正常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!