Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5661] java.lang.ClassNotFoundException: android.support.v7.app.AppCompatViewInflater

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDone
Resolution Date2018-11-28T22:03:04.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid
ReporterNigel Underwood
AssigneeShak Hossain
Created2018-03-15T14:40:19.000+0000
Updated2018-11-28T22:03:05.000+0000

Description

I'm using the Ti.InAppBilling module for Android in-app payments, all seems to go fine until I try to make a purchase using the command InAppBilling.purchase When I issue this, I am receiving a Java.lang.ClassNotFoundException for the class android.support.v7.app.AppCompatViewInflater. Here is the full dump
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: Failed to instantiate custom view inflater android.support.v7.app.AppCompatViewInflater. Falling back to default.
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: java.lang.ClassNotFoundException: android.support.v7.app.AppCompatViewInflater
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at java.lang.Class.classForName(Native Method)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at java.lang.Class.forName(Class.java:324)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at java.lang.Class.forName(Class.java:285)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.support.v7.app.aq.a(SourceFile:480)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.support.v7.app.aq.onCreateView(SourceFile:570)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:746)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at com.google.android.finsky.billing.acquire.AcquireActivity.l(SourceFile:5)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at com.google.android.finsky.billing.acquire.i.onCreate(SourceFile:27)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.app.Activity.performCreate(Activity.java:6259)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.os.Handler.dispatchMessage(Handler.java:102)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.os.Looper.loop(Looper.java:148)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at android.app.ActivityThread.main(ActivityThread.java:5443)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at java.lang.reflect.Method.invoke(Native Method)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.AppCompatViewInflater" on path: DexPathList[[zip file "/data/app/com.android.vending-2/base.apk"],nativeLibraryDirectories=[/data/app/com.android.vending-2/lib/arm, /data/app/com.android.vending-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	... 24 more
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	Suppressed: java.lang.ClassNotFoundException: android.support.v7.app.AppCompatViewInflater
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 		at java.lang.Class.classForName(Native Method)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 		at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 		at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 		... 25 more
03-15 20:04:53.954  8709  8709 I AppCompatDelegate: 	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Comments

  1. Gary Mathews 2018-03-15

    [~sdarda] Looks like it's attempting to use a class thats only available in version 27.1.0 of the support libraries: https://developer.android.com/reference/android/support/v7/app/AppCompatViewInflater.html This PR should fix this: https://github.com/appcelerator/titanium_mobile/pull/9930 Alternatively, the ti.inappbilling module could be updated to contain the newer libraries itself.
  2. Nigel Underwood 2018-03-16

    Can't see to access the pull request as I don't have the permissions. Can grant access?
  3. Sharif AbuDarda 2018-03-17

    Hopefully, 7.2.0 release will fix this. Thanks.
  4. Nigel Underwood 2018-03-19

    Is there an ETA when a build of 7.2.0 will be available with the 27.1.0 support libraries? App is unfortunately on hold until this is available.
  5. Sharif AbuDarda 2018-11-28

    From the comment posted by the user in [Github issue](https://github.com/appcelerator-archive/ti.inappbilling/issues/31#issuecomment-375798081) this issue is resolved. Closing this.

JSON Source