Hello, i'm trying to display a Google map on my Sony SmartWatch3.
In my wear layout, i'm using a MapFragment with this code :
Code:
<fragment
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mapFragment"
class="com.google.android.gms.maps.MapFragment"/>
My wear main activity implements OnMapReadyCallback :
Code:
@Override
public void onMapReady(GoogleMap map) {
SupportMapFragment fragment = ( SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapFragment);
// Getting Google Map
GoogleMap googleMap = fragment.getMap();
Finally, i've got this error :
Code:
02-03 16:44:23.456 2377-2377/com.example.andy.myfirstwearablemapapplication E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.andy.myfirstwearablemapapplication, PID: 2377
android.view.InflateException: Binary XML file line #7: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.wearable.view.WatchViewStub.inflate(WatchViewStub.java:179)
at android.support.wearable.view.WatchViewStub.onApplyWindowInsets(WatchViewStub.java:148)
at android.view.View.dispatchApplyWindowInsets(View.java:6514)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:5782)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:5786)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:5786)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchApplyWindowInsets(PhoneWindow.java:2335)
at android.view.ViewRootImpl.dispatchApplyInsets(ViewRootImpl.java:1205)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1423)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.IllegalStateException: Unable to find dynamic class com.google.android.gms.maps.internal.CreatorImpl
at com.google.android.gms.maps.internal.x.a(Unknown Source)
at com.google.android.gms.maps.internal.x.U(Unknown Source)
at com.google.android.gms.maps.internal.x.S(Unknown Source)
at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.nO(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
at com.google.android.gms.dynamic.a.a(Unknown Source)
at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2115)
at android.app.Activity.onCreateView(Activity.java:5282)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.wearable.view.WatchViewStub.inflate(WatchViewStub.java:179)
at android.support.wearable.view.WatchViewStub.onApplyWindowInsets(WatchViewStub.java:148)
at android.view.View.dispatchApplyWindowInsets(View.java:6514)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:5782)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:5786)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:5786)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchApplyWindowInsets(PhoneWindow.java:2335)
at android.view.ViewRootImpl.dispatchApplyInsets(ViewRootImpl.java:1205)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1423)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Is it really possible to display a map on a watch ? If yes, can you tell me how ?
Thanks in advance
I think that the Google Play Services on Android Wear doesn't have the Map API so java.lang.IllegalStateException was thrown. So no, you can't use the Map API directly on Wear devices
Thanks for your answer
saothoi said:
I think that the Google Play Services on Android Wear doesn't have the Map API so java.lang.IllegalStateException was thrown. So no, you can't use the Map API directly on Wear devices
Click to expand...
Click to collapse
Look at this
https://play.google.com/store/apps/details?id=net.dheera.wearmaps&hl=nl_NL
Thanks for your answer. This application uses Google Maps Static API and apparently, the number of recovered images is limited :/
Can't you make an handled app that uses google map, with wear app synchronizing the displayed picture?
Related
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.res.ThemeConfig.getOverlayPkgNameForApp(java.lang.String)' on a null object reference
at com.cyngn.theme.perapptheming.PerAppThemingWindow.cV(Unknown Source)
at com.cyngn.theme.perapptheming.PerAppThemingWindow.onTouch(Unknown Source)
at android.view.View.dispatchTouchEvent(View.java:8474)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2400)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2093)
at android.view.View.dispatchPointerEvent(View.java:8675)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4129)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3995)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3603)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3569)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3686)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3577)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3743)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3603)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3569)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3577)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5813)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5787)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5758)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5903)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Crash report.....
Pls help me with it guys........
Hi still new to android, tried the following tutorial in the youtube link here https://www.youtube.com/watch?v=4LCnoVqQ6N4 but I couldn't get the app to work as I am unable to execute the camera on my physical phone where it kept giving me this popup "Something went Wrong while taking photos" when I press the camera imageview. And when I am at the gallery choosing a photo it will cause the app to suddenly stop.
Thus, I downloaded the author's source code here https://drive.google.com/file/d/0B2rvGRbu0A83cjBBZElhdGp5OHM/view but i also encounter the same issues stated above.
Tried adding the permission for camera,read,write external storage in the androidmanifest without any luck of solving it.
Error Log after i click on a image in the gallery:
Code:
08-17 12:21:08.181 17286-17286/com.example.user.cameratoserver E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.user.cameratoserver, PID: 17286
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=400, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:104460 flg=0x1 }} to activity {com.example.user.cameratoserver/com.example.user.cameratoserver.MainActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=17286, uid=10038 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.app.ActivityThread.deliverResults(ActivityThread.java:3798)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3841)
at android.app.ActivityThread.access$1400(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=17286, uid=10038 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1627)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:427)
at android.content.ContentResolver.query(ContentResolver.java:497)
at android.content.ContentResolver.query(ContentResolver.java:439)
at com.kosalgeek.android.photoutil.RealPathUtil.getDataColumn(RealPathUtil.java:131)
at com.kosalgeek.android.photoutil.RealPathUtil.getRealPathFromURI_API19(RealPathUtil.java:62)
at com.kosalgeek.android.photoutil.GalleryPhoto.getPath(GalleryPhoto.java:49)
at com.example.user.cameratoserver.MainActivity.onActivityResult(MainActivity.java:100)
at android.app.Activity.dispatchActivityResult(Activity.java:6490)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3794)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3841)
at android.app.ActivityThread.access$1400(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
if you are testing on a device running android marshmallow and above you should also write code to request the android.permission.READ_EXTERNAL_STORAGE permission at runtime.
Take a look at the following link for android developers https://developer.android.com/training/permissions/requesting.html
nemoc 23 said:
if you are testing on a device running android marshmallow and above you should also write code to request the android.permission.READ_EXTERNAL_STORAGE permission at runtime.
Take a look at the following link for android developers https://developer.android.com/training/permissions/requesting.html
Click to expand...
Click to collapse
Oh i see but I've read the documentation but still at a lost as to how to implement the codes from the documentation into the source code in the link above, as this is my first android development experience was feeling rather lost.
imso said:
Oh i see but I've read the documentation but still at a lost as to how to implement the codes from the documentation into the source code in the link above, as this is my first android development experience was feeling rather lost.
Click to expand...
Click to collapse
If you are below MM you just need to add the permission to the manifest.
Code:
<manifest>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
If you are on MM or higher you need to add the permission the manifest and then ask for it at runtime.
Code:
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.READ_CONTACTS) != PackageManager.READ_EXTERNAL_STORAGE) {
ActivityCompat.requestPermissions(thisActivity, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, CALLBACK_ID);
}
You will also need to handle the result of that on your activity:
Code:
@Override public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
if (requestCode == CALLBACK_ID) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// Granted
} else {
// Not granted
}
}
}
Just installed Android 6.0 and cm13
After adding Google account, contacts unfortunately crash while syncing. Your solutions are greatly appreciated. I tried installing Google contacts sync 7.0...still crashing though. Tried wiping cache in recovery mode...refreshed permissions...thank u for your time.
java.lang.RuntimeException: Unable to get provider com.google.android.syncadapters.contacts.ProxyGalProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.android.syncadapters.contacts.ProxyGalProvider" on path: DexPathList[[zip file "/data/app/com.google.android.syncadapters.contacts-2/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.syncadapters.contacts-2/lib/arm, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5200)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4792)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4732)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.syncadapters.contacts.ProxyGalProvider" on path: DexPathList[[zip file "/data/app/com.google.android.syncadapters.contacts-2/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.syncadapters.contacts-2/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.ActivityThread.installProvider(ActivityThread.java:5185)
... 10 more
Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.google.android.syncadapters.contacts-2/base.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:295)
at dalvik.system.DexFile.<init>(DexFile.java:80)
at dalvik.system.DexFile.<init>(DexFile.java:59)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279)
at dalvik.system.DexPathList.makePathElements(DexPathList.java:248)
at dalvik.system.DexPathList.<init>(DexPathList.java:120)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:376)
at android.app.LoadedApk.makeApplication(LoadedApk.java:569)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4724)
... 8 more
Suppressed: java.lang.ClassNotFoundException: com.google.android.syncadapters.contacts.ProxyGalProvider
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
I'm having the same issue with my nexus 5. i haven't found any solution yet.
Same problem with LG G2 Mini.
bryplusan said:
Just installed Android 6.0 and cm13
After adding Google account, contacts unfortunately crash while syncing. Your solutions are greatly appreciated. I tried installing Google contacts sync 7.0...still crashing though. Tried wiping cache in recovery mode...refreshed permissions...thank u for your time.
java.lang.RuntimeException: Unable to get provider com.google.android.syncadapters.contacts.ProxyGalProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.android.syncadapters.contacts.ProxyGalProvider" on path: DexPathList[[zip file "/data/app/com.google.android.syncadapters.contacts-2/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.syncadapters.contacts-2/lib/arm, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5200)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4792)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4732)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.syncadapters.contacts.ProxyGalProvider" on path: DexPathList[[zip file "/data/app/com.google.android.syncadapters.contacts-2/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.syncadapters.contacts-2/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.ActivityThread.installProvider(ActivityThread.java:5185)
... 10 more
Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.google.android.syncadapters.contacts-2/base.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:295)
at dalvik.system.DexFile.<init>(DexFile.java:80)
at dalvik.system.DexFile.<init>(DexFile.java:59)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279)
at dalvik.system.DexPathList.makePathElements(DexPathList.java:248)
at dalvik.system.DexPathList.<init>(DexPathList.java:120)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:376)
at android.app.LoadedApk.makeApplication(LoadedApk.java:569)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4724)
... 8 more
Suppressed: java.lang.ClassNotFoundException: com.google.android.syncadapters.contacts.ProxyGalProvider
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Click to expand...
Click to collapse
I may have found a solution by myself.
1.Disable Webview on android in apps manager its only 2mb !!
2.Then download Webview on android from Google playstore and reboot the phone and whola its fixed (thats how i fixed it)
Hope i helped
I had to replace the cm webview with the Google webview using the opengapps Aroma package but that worked for me.
Thanks
bryplusan said:
Just installed Android 6.0 and cm13
After adding Google account, contacts unfortunately crash while syncing.
Click to expand...
Click to collapse
Hi!
I had the same problem. Here is the solution.
1. You need to install Google Contacts Sync 6.0.1 and reboot. Check in the Settings -> Apps that "Google Contacts Sync" has permission to Contacts. After that try to sync your contacts.
2. If 1st step hasn't any result try to remove your account in the Settings -> Accounts than go to the contacts and try to import contacts from account and use your Google account once again.
For me (GS5 and CM13 and CM13-based ROMs) there was only 1st step enough.
I have a problem with widgets on AOKP 8.1 from 03.04. When i wan't to put a Widget on Homescreen with some i get the message "Problem loading widget" and other widgets from the same app is working fine. Anyone knows how to fix it, i searched on google, but didnt found a solution.
I take a logcat here what i get:
updateAppWidget couldn't find any view, using error view
android.view.InflateException: Binary XML file line #159: Binary XML file line #159: Error inflating class android.widget.ListView
Caused by: android.view.InflateException: Binary XML file line #159: Error inflating class android.widget.ListView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
at android.view.LayoutInflater.createView(LayoutInflater.java:647)
at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:720)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:788)
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.rInflate(LayoutInflater.java:866)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
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.widget.RemoteViews.inflateView(RemoteViews.java:3498)
at android.widget.RemoteViews.-wrap1(Unknown Source:0)
at android.widget.RemoteViews$AsyncApplyTask.doInBackground(RemoteViews.java:3600)
at android.widget.RemoteViews$AsyncApplyTask.doInBackground(RemoteViews.java:3596)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.<init>(Handler.java:204)
at android.os.Handler.<init>(Handler.java:118)
at android.widget.AbsListView$1.<init>(AbsListView.java:3936)
at android.widget.AbsListView.<init>(AbsListView.java:3936)
at android.widget.ListView.<init>(ListView.java:227)
at android.widget.ListView.<init>(ListView.java:223)
at android.widget.ListView.<init>(ListView.java:219)
... 24 more
Hello everyone, I open this thread here because I know much of the people here have more experience and may be can help with the problem.
I have a tablet Chuwi with Intel Celeron (x86-x64) with Windows and now I make dual boot with "Phoenix OS Thunder Lite v4.5 Android x86", every think work as expected but main app which I use crash. I investigate the problem and with the another port "Prime OS Thunder Lite v1.0" the issue doesn't present and work like a charm. But with Prime OS i have very short life time, in Phoenix OS is greatly improved. After a coup of port I considered the something in Phoenix OS (no matter which port or mod) have this issue. I have a log with the error, generated by the application + video of the problem.
The quote of the log:
Code:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cnnlaunch.x431.pro3S/com.cnlaunch.x431pro.activity.diagnose.CarIconActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
Full log:
Spoiler: Full log
Devices Model: Thunder OS
Devices SDK Version: 25
Software Version Name: 66 AG
Software Version Code: 129
Software Type: X431PADII
Crash Time: 2021-01-18,19-47-22
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cnnlaunch.x431.pro3S/com.cnlaunch.x431pro.activity.diagnose.CarIconActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2713)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:136)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:348)
at com.cnlaunch.x431pro.activity.MainActivity.c(Unknown Source)
at com.cnlaunch.x431pro.utils.bs.a(Unknown Source)
at com.cnlaunch.x431pro.utils.d.f.a(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.d(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.c(Unknown Source)
at com.cnlaunch.x431pro.activity.ah.onClick(Unknown Source)
at android.view.View.performClick(View.java:5638)
at android.view.View$PerformClick.run(View.java:22435)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6300)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:887)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
at com.cnlaunch.x431pro.widget.a.db.<init>(Unknown Source)
at com.cnlaunch.x431pro.activity.diagnose.CarIconFragmentForAll.onActivityCreated(Unknown Source)
at android.app.Fragment.performActivityCreated(Fragment.java:2362)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.BackStackRecord.run(BackStackRecord.java:816)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)
at android.app.FragmentController.execPendingActions(FragmentController.java:371)
at android.app.Activity.performStart(Activity.java:6724)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2676)
... 18 more
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null object reference
at com.cnlaunch.x431pro.widget.a.db.<init>(Unknown Source)
at com.cnlaunch.x431pro.activity.diagnose.CarIconFragmentForAll.onActivityCreated(Unknown Source)
at android.app.Fragment.performActivityCreated(Fragment.java:2362)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.BackStackRecord.run(BackStackRecord.java:816)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)
at android.app.FragmentController.execPendingActions(FragmentController.java:371)
at android.app.Activity.performStart(Activity.java:6724)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2676)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:136)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:348)
at com.cnlaunch.x431pro.activity.MainActivity.c(Unknown Source)
at com.cnlaunch.x431pro.utils.bs.a(Unknown Source)
at com.cnlaunch.x431pro.utils.d.f.a(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.d(Unknown Source)
at com.cnlaunch.x431pro.activity.ap.c(Unknown Source)
at com.cnlaunch.x431pro.activity.ah.onClick(Unknown Source)
at android.view.View.performClick(View.java:5638)
at android.view.View$PerformClick.run(View.java:22435)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6300)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:887)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
Video link with the problem -
App link - https://drive.google.com/file/d/15gLSmf2SxzSZ5XmOXVQh4D4lWKMlDl6w/view?usp=sharing
Thanks!