Closed ghost closed 6 years ago
You're probably on Android plugin 3.2+. If so, please update to https://github.com/maxmpz/powerampapi/commit/d375a5e07a72f27834d5fe49c0931638a3c13a6a
I am on master, so the changes in the commit you linked are there. Oh, and yes, I'm using the 3.2 plugin.
I don't think I can reproduce this issue on Android Studio 3.2 with latest updates. I would recommend using Android Studio => File => Invalidate Caches / Restart + Full clean rebuild
Skin sample project updated to android plugin 3.2.1 and built with latest available stable Android studio / gradle / sdk / plugin OK.
Still happening for me using latest commit and the same configuration as you stated above. I'm also using the Poweramp-rc-build-799-uni apk.
2018-10-19 09:20:17.153 541-541/? E/BaseActivity: android.view.InflateException: File: com.maxmpz.audioplayer:layout/activity_list_fast -> Binary XML file line #53: Binary XML file line #53: You must supply a layout_width attribute.
Caused by: java.lang.UnsupportedOperationException: Binary XML file line #53: You must supply a layout_width attribute.
at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:775)
at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:7606)
at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:7798)
at android.widget.FrameLayout$LayoutParams.<init>(FrameLayout.java:439)
at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:370)
at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:368)
at qa.l1l1(":1013)
at qa.l1l1(":846)
at sm.l1l1(":278)
at qa.inflate(":403)
at qa.inflate(":352)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:444)
at android.app.Activity.setContentView(Activity.java:2661)
at com.maxmpz.audioplayer.BaseActivity.l1l1(":551)
at com.maxmpz.audioplayer.BaseActivity.setContentView(":546)
at com.maxmpz.audioplayer.ListActivity.onCreate(":105)
at android.app.Activity.performCreate(Activity.java:6982)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2811)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2933)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1612)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6710)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
2018-10-19 09:20:17.153 541-541/? E/BaseActivity: handleLayoutFailure=>resetSkinOnFail
2018-10-19 09:20:17.154 541-541/? E/BaseActivity: Skin failed: com.poweramp.v3.sampleskin, resetting to default
Basically, something prevents your environment to build proper APK (no resources included).It looks like invalid AAPT2 result due to either old or some beta Android SDK Build tools.
Do you build against that 799 build and path to 799 Poweramp apk in app build.gradle is updated? aaptOptions { additionalParameters "--package-id", "0x80", "-I", "PATH TO YOUR POWERAMP APK HERE" }
My current aapt2 is ver 3.2.1-4818971
Which is odd, because if I put a path that doesn't exists, the build fails, as you can see:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: W/ziparchive( 548): Unable to open 'C:\Users\felbottrel\audioplayer2.apk': No such file or directory
error: failed to open APK: I/O error.
Command: C:\Users\felbottrel\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\bb9647348f8bf26b977d64e72ce37267\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\felbottrel\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\felbottrel\Code\powerampapi\poweramp_skin_sdk\poweramp_skin_sample\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\felbottrel\Code\powerampapi\poweramp_skin_sdk\poweramp_skin_sample\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
@C:\Users\felbottrel\Code\powerampapi\poweramp_skin_sdk\poweramp_skin_sample\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\felbottrel\Code\powerampapi\poweramp_skin_sdk\poweramp_skin_sample\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.poweramp.v3.sampleskin\
-0\
apk\
--package-id\
0x80\
-I\
C:\Users\felbottrel\audioplayer2.apk\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
If I put the correct path it builds successfully, so theoretically it should be linked correctly, right?
Hi there. Im having exactly the same problem as felbottrel. Have the correct path to the apk. I'm using Android Studio 3.2.1
That shouldn't be a empty path (comment evaluated test in >< as tag and hid it). Path to recent Poweramp APK should be there.
andres, are you on windows too?
No, im on Mac OS 10.13.6
Hi there.. Any update on this?
You may need to turn off the Android Studio's "Instant Run" feature. (Prefs > Build, Execution, Deployment > Instant Run)
I turned off mine, invalidated caches, and it worked.
@simplyrains Thank you!!! It works!
Thanks for the hint.
I'm trying to run the sample skin as is to see it running before I start changing styles, but even if it builds correctly it crashes at runtime.
The only thing I changed initially was the path for
additionalParameters
in build.gradle. It built successfully. Later I tried to change the app package and some values in skins.xml and in the styles but the errors persisted. Note that this happens with both the normal and the alternative sample skin.If I try to open it with the "Start Poweramp With * Skin" button, I get this error:
If I try to open Poweramp, go to the skin settings, choose one of the sample skins (with all its options turned off), and go back, I get this:
If I go to the skin activity, go to "Open Theme Settings", chose the sample skin and go back, I get this:
I'm using build 799, running on my device with Android 8.1