Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App does not start #4

Closed
BertV1 opened this issue Oct 27, 2024 · 9 comments
Closed

App does not start #4

BertV1 opened this issue Oct 27, 2024 · 9 comments
Labels
bug Issue/PR is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software

Comments

@BertV1
Copy link

BertV1 commented Oct 27, 2024

App does not start:
Device - Samsung A50 (android 11).

@theScrabi
Copy link
Member

theScrabi commented Oct 28, 2024

Please provide more information. Until then, I'm closing this issue.

@asandikci
Copy link

@theScrabi
I have same issue with Android 9 device (armeabi-v7a / armeabi)

Log:

FATAL EXCEPTION: main
Process: net.newpipe.newplayer.testapp, PID: 10347
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.newpipe.newplayer.testapp/net.newpipe.newplayer.testapp.MainActivity}: android.view.InflateException: Binary XML file line #76: Binary XML file line #64: Error inflating class Button
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3134)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3277)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1969)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7127)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: android.view.InflateException: Binary XML file line #76: Binary XML file line #64: Error inflating class Button
Caused by: android.view.InflateException: Binary XML file line #64: Error inflating class Button
Caused by: java.lang.UnsupportedOperationException: Can't convert to ComplexColor: type=0x1
	at android.content.res.ResourcesImpl.loadComplexColorForCookie(ResourcesImpl.java:1131)
	at android.content.res.ResourcesImpl.loadComplexColorFromName(ResourcesImpl.java:1007)
	at android.content.res.ResourcesImpl.loadColorStateList(ResourcesImpl.java:1086)
	at android.content.res.Resources.loadColorStateList(Resources.java:1056)
	at android.content.res.TypedArray.getColorStateList(TypedArray.java:549)
	at android.view.View.<init>(View.java:5772)
	at android.widget.TextView.<init>(TextView.java:1118)
	at android.widget.Button.<init>(Button.java:181)
	at android.widget.Button.<init>(Button.java:156)
	at androidx.appcompat.widget.AppCompatButton.<init>(AppCompatButton.java:81)
	at com.google.android.material.button.MaterialButton.<init>(MaterialButton.java:234)
	at com.google.android.material.button.MaterialButton.<init>(MaterialButton.java:230)
	at com.google.android.material.theme.MaterialComponentsViewInflater.createButton(MaterialComponentsViewInflater.java:43)
	at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:156)
	at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1654)
	at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1705)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:811)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:902)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:863)
	at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1034)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:898)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:863)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:905)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:863)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:554)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:457)
	at net.newpipe.newplayer.testapp.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:99)
	at net.newpipe.newplayer.testapp.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:93)
	at net.newpipe.newplayer.testapp.MainActivity.onCreate(MainActivity.kt:66)
	at android.app.Activity.performCreate(Activity.java:7340)
	at android.app.Activity.performCreate(Activity.java:7331)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3114)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3277)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1969)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7127)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

@BertV1
Copy link
Author

BertV1 commented Oct 29, 2024

@theScrabi
I'm sorry for not being more clear.
I don't have root on this phone, do you want me to post an error log using adb?
The app does not start, as in i see a blank screen with a horizontal purple like bar on the top.

@asandikci
Copy link

I have exact same issue. You can get logs with LogFox

@BertV1
Copy link
Author

BertV1 commented Oct 29, 2024

I have exact same issue. You can get logs with LogFox

Much obliged! Indeed, the exact same issue:

FATAL EXCEPTION: main
Process: net.newpipe.newplayer.testapp, PID: 14635
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.newpipe.newplayer.testapp/net.newpipe.newplayer.testapp.MainActivity}: android.view.InflateException: Binary XML file line #76 in net.newpipe.newplayer.testapp:layout/activity_main: Binary XML file line #64 in net.newpipe.newplayer.testapp:layout/buttons: Error inflating class Button
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3846)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4022)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2336)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:246)
	at android.app.ActivityThread.main(ActivityThread.java:8653)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: android.view.InflateException: Binary XML file line #76 in net.newpipe.newplayer.testapp:layout/activity_main: Binary XML file line #64 in net.newpipe.newplayer.testapp:layout/buttons: Error inflating class Button
Caused by: android.view.InflateException: Binary XML file line #64 in net.newpipe.newplayer.testapp:layout/buttons: Error inflating class Button
Caused by: java.lang.UnsupportedOperationException: Can't convert to ComplexColor: type=0x1
	at android.content.res.ResourcesImpl.loadComplexColorForCookie(ResourcesImpl.java:1371)
	at android.content.res.ResourcesImpl.loadComplexColorFromName(ResourcesImpl.java:1247)
	at android.content.res.ResourcesImpl.loadColorStateList(ResourcesImpl.java:1326)
	at android.content.res.Resources.loadColorStateList(Resources.java:1249)
	at android.content.res.TypedArray.getColorStateList(TypedArray.java:600)
	at android.view.View.<init>(View.java:6282)
	at android.widget.TextView.<init>(TextView.java:1247)
	at android.widget.Button.<init>(Button.java:174)
	at android.widget.Button.<init>(Button.java:149)
	at androidx.appcompat.widget.AppCompatButton.<init>(AppCompatButton.java:81)
	at com.google.android.material.button.MaterialButton.<init>(MaterialButton.java:234)
	at com.google.android.material.button.MaterialButton.<init>(MaterialButton.java:230)
	at com.google.android.material.theme.MaterialComponentsViewInflater.createButton(MaterialComponentsViewInflater.java:43)
	at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:156)
	at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1654)
	at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1705)
	at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1059)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:995)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
	at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1261)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1117)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
	at net.newpipe.newplayer.testapp.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:99)
	at net.newpipe.newplayer.testapp.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:93)
	at net.newpipe.newplayer.testapp.MainActivity.onCreate(MainActivity.kt:66)
	at android.app.Activity.performCreate(Activity.java:8207)
	at android.app.Activity.performCreate(Activity.java:8191)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3819)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4022)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2336)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:246)
	at android.app.ActivityThread.main(ActivityThread.java:8653)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

I'm fairly unfamiliar with android development, but maybe this can help? Also seems to deal with support for older android versions.
stackoverflow issue

@asandikci
Copy link

@theScrabi could you please re-open this issue?

@theScrabi theScrabi reopened this Oct 29, 2024
@theScrabi
Copy link
Member

all right. that's interesting. I'm looking into it. Thanks for clarifying :D

@theScrabi
Copy link
Member

theScrabi commented Oct 29, 2024

Ok turns out in the test app I referenced color definitions that did not exist in such old android versions. I replaced them with static colors.

Check this apk. It should work (better) now:
NewPlayer-testapp-0.0.2-alpha_fixedcrash_debug.apk.zip

@BertV1
Copy link
Author

BertV1 commented Oct 29, 2024

Screenshot_20241029-231208
Looks good now! Thanks.

@ShareASmile ShareASmile added bug Issue/PR is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue/PR is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software
Projects
None yet
Development

No branches or pull requests

4 participants