Enable ProGuard on Android Studio and
./gradlew assemblyRelease
When building with the above command, the following error occurs:
FAILURE: Build failed with an exception.
java.io.IOException: Can't read [[project_path]/app/android-support-v4.jar(;;;;;!META-INF/MANIFEST.MF)] (No such file or directory)
java.io.IOException: Can't read [[project_path]/app/android-support-v4.jar(;;;;;!META-INF/MANIFEST.MF)] (No such file or directory)
I think it's probably an error (described later) due to multiple libraries including android-support-v4
, but I don't know the correct solution.
Please let me know if anyone knows an effective solution to the above.
By the way, I use android-support-v7-appcompat
and facebook
for the library.
I import it as a library project.
build.gradle
Excerpts:
dependencies {
compilefileTree (dir: 'libs', include: ['*.jar'])
compile project(':External:android-support-v7-appcompat')
compile project(':External:facebook:facebook')
compile project(':External:PagerSlidingTabStrip:library')
}
./gradlew-q dependencies
Check the dependencies in
You'll probably find some com.android.support:support-v4
.Leave only support-v4
, which depends on com.android.support:appcompat-v7
, and exclude all others.
dependencies {
compile project(':External:android-support-v7-appcompat')
compile('com.example.foo.bar:xxx'){
exclude module: 'support-v4'
}
}
If the libs
directory contains android-support-v4.jar
, delete it.
© 2024 OneMinuteCode. All rights reserved.