FORUMS

SDK

SDK

ForumsSDK
"Error inflating class uses-feature" in sample app
Csaba8472

● SDK Type: Dual Screen SDK

hello

imported dual screen sdk as it is written:
Importing the Library

1) Copy jar file in libs folder of package to apps > libs in Project folder.
2) Import below phrase to top of MainActivity.java file.


but I get this error:


2020-09-28 10:27:42.550 21757-21757/com.lge.dualscreenstate E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.lge.dualscreenstate, PID: 21757
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lge.dualscreenstate/com.lge.dualscreenstate.MainActivity}: android.view.InflateException: Binary XML file line #9 in com.lge.dualscreenstate:layout/activity_main: Binary XML file line #9 in com.lge.dualscreenstate:layout/activity_main: Error inflating class uses-feature
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3323)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3462)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
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:2063)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7615)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Caused by: android.view.InflateException: Binary XML file line #9 in com.lge.dualscreenstate:layout/activity_main: Binary XML file line #9 in com.lge.dualscreenstate:layout/activity_main: Error inflating class uses-feature
Caused by: android.view.InflateException: Binary XML file line #9 in com.lge.dualscreenstate:layout/activity_main: Error inflating class uses-feature
Caused by: java.lang.ClassNotFoundException: android.view.uses-feature
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at android.view.LayoutInflater.createView(LayoutInflater.java:815)
at android.view.LayoutInflater.createView(LayoutInflater.java:776)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:913)
at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:68)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:930)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:950)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
at android.view.LayoutInflater.inflate(LayoutInflater.java:682)
at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.lge.dualscreenstate.MainActivity.onCreate(MainActivity.java:23)
at android.app.Activity.performCreate(Activity.java:7835)
at android.app.Activity.performCreate(Activity.java:7824)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3462)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
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:2063)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7615)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
2020-09-28 10:27:42.550 21757-21757/com.lge.dualscreenstate E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.uses-feature" on path: DexPathList[[zip file "/data/app/com.lge.dualscreenstate-OovPf9ga8jSFgskWcU1qkQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.lge.dualscreenstate-OovPf9ga8jSFgskWcU1qkQ==/lib/arm64, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 33 more



What's the problem here?
Posted on 28-Sep-2020