私は既存のプロジェクトに2つの異なるAndroidライブラリモジュールを作成しました。アンドロイドライブラリモジュールでパッケージが見つかりません
今、私がこのアプリケーションを実行しようとすると、そのパッケージがプロジェクトに存在しないというエラーが表示されます。これは実際には両方のモジュールが正しい場所にあり、以前はライブラリモジュールが1つしかなかったので、実際はうまくいかず、機能していました。
また、gradle構築中にエラーが発生しません。
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.cl.lo"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile project(":ge")
compile project(":in")
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
}
この1つはあるのGradleファイル内:
この1つはアプリのGradleのファイルです。
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
}
そして最後に、この1つはGEのGradleファイルです:GEのbuild.gradleにこの行を削除して更新
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
}
Googleサービスの問題ではありません。 – driftking9987
@ driftking9987が私の答えを更新しました。 – Toris
あなたは正しいです、 'minifyEnabled'を削除して、そのトリックをやりました。 sidenoteについては、ライブラリのaarファイルを配布するつもりです。その場合、 'minifyEnabled'はどこで実行すればよいですか? – driftking9987