很抱歉询问“明显”不是将sql文件放在源文件夹中的最佳做法,但这是我公司的要求。 所以,我有一个sql文件,我必须把它放在源文件夹,但在构建gradle后,我的apk文件不包含sql文件。 我的项目树:
我的build.gradle
文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.ods.loadsheet"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
signingConfigs {
release {
storeFile file("keystore.properties")
storePassword "****"
keyAlias "****"
keyPassword "****"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.github.rey5137:material:1.2.1'
compile 'com.android.support:support-v4:23.0.0'
compile "com.android.support:gridlayout-v7:23.0.0"
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'me.dm7.barcodescanner:zxing:1.8.3'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.4.0'
compile 'com.github.quentin7b:android-location-tracker:3.0'
compile 'com.afollestad:material-dialogs:0.7.9.1'
}