ihrthk / android-gradle-mulchannel-plugin Goto Github PK
View Code? Open in Web Editor NEWGradle plugin for generating multiple channel apks
Home Page: http://tech.meituan.com/mt-apk-packaging.html
License: MIT License
Gradle plugin for generating multiple channel apks
Home Page: http://tech.meituan.com/mt-apk-packaging.html
License: MIT License
:library:OneKeyShare:bundleRelease UP-TO-DATE
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\qihu360.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\baidu.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\yingyongbao.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\wandoujia.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\taobao.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\xiaomi.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\nearme.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\anzhuo.apk
[zip] Building zip: D:\workspace\leying\build\outputs\apk\out\anzhi.apk
:mulchannel FAILED
FAILURE: Build failed with an exception.
我在应用中的res/raw
目录下放置了一个名为test.mp3的文件,在Activity
中使用SoundPool
加载之:
soundPool.load(this, R.raw.test, 1);
在使用该插件打包前测试了下应用,加载音频文件是OK的,打包后提示类似如下的错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mypackage/com.mypackage.HomepageActivity}: android.content.res.Resources$NotFoundException: File res/raw/test.mp3 from drawable resource ID #0x7f050014
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2457)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
at android.app.ActivityThread.access$1200(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5669)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: android.content.res.Resources$NotFoundException: File res/raw/test.mp3 from drawable resource ID #0x7f050014
at android.content.res.Resources.openRawResourceFd(Resources.java:1251)
at android.media.SoundPool$SoundPoolImpl.load(SoundPool.java:568)
at android.media.SoundPool.load(SoundPool.java:229)
at com.mypackage.HomepageActivity.w(HomepageActivity.java:104)
at com.mypackage.HomepageActivity.onCreate(HomepageActivity.java:88)
at android.app.Activity.performCreate(Activity.java:6107)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2410)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
at android.app.ActivityThread.access$1200(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5669)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
at android.content.res.AssetManager.openNonAssetFdNative(Native Method)
at android.content.res.AssetManager.openNonAssetFd(AssetManager.java:426)
at android.content.res.Resources.openRawResourceFd(Resources.java:1248)
at android.media.SoundPool$SoundPoolImpl.load(SoundPool.java:568)
at android.media.SoundPool.load(SoundPool.java:229)
at com.mypackage.HomepageActivity.w(HomepageActivity.java:104)
at com.mypackage.HomepageActivity.onCreate(HomepageActivity.java:88)
at android.app.Activity.performCreate(Activity.java:6107)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2410)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
at android.app.ActivityThread.access$1200(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5669)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
跟进log提示,可能是ant在打包时对mp3文件进行了压缩,导致mp3打开失败。
如题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.