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

CardReadersActivity InflateException error #11

Closed
jonassimonaitis opened this issue Nov 10, 2020 · 9 comments
Closed

CardReadersActivity InflateException error #11

jonassimonaitis opened this issue Nov 10, 2020 · 9 comments

Comments

@jonassimonaitis
Copy link

jonassimonaitis commented Nov 10, 2020

Expected Behavior

Open CardReadersActivity

Current Behavior

CardReadersActivity crashes due to android.view.InflateException

Steps to Reproduce

startActivity(CardReadersActivity.newIntent(this))
Call CardReaderActivity

Context

  • AppTheme: Theme.MaterialComponents.Light.NoActionBar.Bridge
  • Operating Version: 4.0.2

Failure Logs

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.mobonapps.kiosk, PID: 27501
    android.view.InflateException: Binary XML file line #29: Binary XML file line #29: Error inflating class TextView
    Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class TextView
    Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 15: TypedValue{t=0x2/d=0x7f040129 a=-1}
        at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:731)
        at android.view.View.<init>(View.java:5030)
        at android.widget.TextView.<init>(TextView.java:892)
        at android.widget.TextView.<init>(TextView.java:886)
        at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:100)
        at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:95)
        at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:194)
        at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:115)
        at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1551)
        at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1602)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
        at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:873)
        at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:806)
        at androidx.appcompat.app.AppCompatDelegateImpl.onPostCreate(AppCompatDelegateImpl.java:527)
        at androidx.appcompat.app.AppCompatActivity.onPostCreate(AppCompatActivity.java:127)
        at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1343)
        at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3006)
        at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
        at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1820)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6758)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@fabriciovergara
Copy link
Contributor

fabriciovergara commented Nov 10, 2020

Hi, thanks for this report.

Mostly likely it's because you are running on Android 4.0. Unfortunately this SDK is supposed to run on Android 5 or higher.
Please, can you confirm if this happens on Android 5 or higher?

We will update the docs and take a look to enforce minimal API level.

@jonassimonaitis
Copy link
Author

jonassimonaitis commented Nov 10, 2020 via email

@jonassimonaitis
Copy link
Author

Any news?

@fabriciovergara
Copy link
Contributor

I didn't managed to reproduce, would be possible to provide a sample app with this specific case?

@jonassimonaitis
Copy link
Author

jonassimonaitis commented Nov 16, 2020 via email

@jonassimonaitis
Copy link
Author

jonassimonaitis commented Nov 16, 2020 via email

@fabriciovergara
Copy link
Contributor

fabriciovergara commented Nov 16, 2020

I understand, my idea was to create a fork from the sample in this repo and make it happen.
I've create a fork and bugfix/issue-11 branch, if possible you can create a PR pointing to this branch where you can reproduce.

https://github.com/fabriciovergara/sdk-android/pull/1

@jonassimonaitis
Copy link
Author

Hey @fabriciovergara,

We have found that one of our AAR dependencies had <style name="AppTheme" in values.xml and that had conflict with iZettle library. After disabling the AAR we managed to fix the issue.

Kind regards

@fabriciovergara
Copy link
Contributor

fabriciovergara commented Nov 18, 2020

Good to know, thanks!
I'll let your design platform team to know and we will try to rename this AppTheme to something more iZettle specific to prevent future conflict. But it can take quite some time to go live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants