Android Question app crash when inpùt text in EditText

rkxo

Active Member
Licensed User
Hello,
I have a problem in which the application closes unexpectedly. Happens when load layout this has an EditText and edit text or click this EditText named "ComentText" very quickly while this is loaded a value by code. I tried to capture the failure with a "try catch" but it is not possible since the entire application is closed.Any idea?

android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:216)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2155)
at android.content.res.Resources.getLayout(Resources.java:1155)
at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.widget.Editor$SuggestionsPopupWindow.initContentView(Editor.java:3589)
at android.widget.Editor$PinnedPopupWindow.<init>(Editor.java:3271)
at android.widget.Editor$SuggestionsPopupWindow.<init>(Editor.java:3555)
at android.widget.Editor.replace(Editor.java:439)
at android.widget.-$$Lambda$DZXn7FbDDFyBvNjI-iG9_hfa7kw.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
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)
emulator bug report
07-19 13:13:05.785 7911 7911 V StatusBar: setLightsOn(true)
07-19 13:13:05.894 16539 16539 E visa.gestv2.co: Invalid ID 0x00000000.
07-19 13:13:05.895 16539 16539 D AndroidRuntime: Shutting down VM
07-19 13:13:05.897 16539 16539 E AndroidRuntime: FATAL EXCEPTION: main
07-19 13:13:05.897 16539 16539 E AndroidRuntime: Process: aluvisa.gestv2.com, PID: 16539
07-19 13:13:05.897 16539 16539 E AndroidRuntime: android.content.res.Resources$NotFoundException: Resource ID #0x0
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:216)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.content.res.Resources.loadXmlResourceParser(Resources.java:2155)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.content.res.Resources.getLayout(Resources.java:1155)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.widget.Editor$SuggestionsPopupWindow.initContentView(Editor.java:3589)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.widget.Editor$PinnedPopupWindow.<init>(Editor.java:3271)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.widget.Editor$SuggestionsPopupWindow.<init>(Editor.java:3555)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.widget.Editor.replace(Editor.java:439)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.widget.-$$Lambda$DZXn7FbDDFyBvNjI-iG9_hfa7kw.run(Unknown Source:2)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6669)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
07-19 13:13:05.897 16539 16539 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
07-19 13:13:05.898 16539 16539 I B4A : ~e:android.content.res.Resources$NotFoundException: Resource ID #0x0
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:216)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.content.res.Resources.loadXmlResourceParser(Resources.java:2155)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.content.res.Resources.getLayout(Resources.java:1155)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.widget.Editor$SuggestionsPopupWindow.initContentView(Editor.java:3589)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.widget.Editor$PinnedPopupWindow.<init>(Editor.java:3271)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.widget.Editor$SuggestionsPopupWindow.<init>(Editor.java:3555)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.widget.Editor.replace(Editor.java:439)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.widget.-$$Lambda$DZXn7FbDDFyBvNjI-iG9_hfa7kw.run(Unknown Source:2)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.os.Handler.handleCallback(Handler.java:873)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.os.Looper.loop(Looper.java:193)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at android.app.ActivityThread.main(ActivityThread.java:6669)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at java.lang.reflect.Method.invoke(Native Method)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
07-19 13:13:05.898 16539 16539 I B4A : ~e: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
07-19 13:13:06.015 7911 7911 V StatusBar: setLightsOn(true)
07-19 13:13:06.017 3010 3488 W SurfaceFlinger: Attempting to set client state on removed layer: Surface(name=db978e7 InputMethod)/@0xac29ddf - animation-leash#0
07-19 13:13:06.017 3010 3488 W SurfaceFlinger: Attempting to destroy on removed layer: Surface(name=db978e7 InputMethod)/@0xac29ddf - animation-leash#0
07-19 13:13:06.033 7911 7911 V StatusBar: setLightsOn(true)
07-19 13:13:06.101 7786 10322 I am_crash: [16539,0,aluvisa.gestv2.com,412663364,android.content.res.Resources$NotFoundException,Resource ID #0x0,ResourcesImpl.java,216]
07-19 13:13:06.102 7786 10322 W ActivityManager: Force finishing activity aluvisa.gestv2.com/.main
07-19 13:13:06.104 7786 10322 I am_finish_activity: [0,25378417,248,aluvisa.gestv2.com/.main,force-crash]
07-19 13:13:06.106 7786 10322 I am_focused_stack: [0,0,64,finishActivity adjustFocus]
07-19 13:13:06.106 7786 10322 I wm_task_moved: [2,0,2147483647]
07-19 13:13:06.107 7786 10322 I am_pause_activity: [0,25378417,aluvisa.gestv2.com/.main,userLeaving=false]
07-19 13:13:06.110 7786 7801 I sysui_count: [window_time_0,31]
07-19 13:13:06.110 7786 7801 I sysui_multi_action: [757,803,799,window_time_0,802,31]
07-19 13:13:06.111 7786 10322 I sysui_action: [316,-1]
07-19 13:13:06.111 7786 10322 I sysui_multi_action: [757,316,758,4,759,-1]
07-19 13:13:06.110 7911 7911 V StatusBar: setLightsOn(true)
07-19 13:13:06.111 16539 16539 I Process : Sending signal. PID: 16539 SIG: 9
07-19 13:13:06.155 0 0 D ieee80211 phy0: mac80211_hwsim_config (freq=0 idle=0 ps=0 smps=auto)
07-19 13:13:06.159 7786 7857 W InputDispatcher: channel 'cfedabf aluvisa.gestv2.com/aluvisa.gestv2.com.main (server)' ~ Consumer closed input channel or an error occurred. events=0x9
07-19 13:13:06.159 7786 7857 E InputDispatcher: channel 'cfedabf aluvisa.gestv2.com/aluvisa.gestv2.com.main (server)' ~ Channel is unrecoverably broken and will be disposed!
07-19 13:13:06.163 7786 10318 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=83, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND Unwanted: Uid: 10073] ], android.os.BinderProxy@27a5839)
07-19 13:13:06.164 7786 10318 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=84, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND Unwanted: Uid: 10073] ], android.os.BinderProxy@a0f1e7e)
07-19 13:13:06.169 1581 1581 E lowmemorykiller: Error opening /proc/16539/oom_score_adj; errno=2
07-19 13:13:06.169 7729 7729 I Zygote : Process 16539 exited due to signal (9)
07-19 13:13:06.171 7786 7941 I WindowManager: WIN DEATH: Window{cfedabf u0 aluvisa.gestv2.com/aluvisa.gestv2.com.main}
07-19 13:13:06.171 7786 7941 W InputDispatcher: Attempted to unregister already unregistered input channel 'cfedabf aluvisa.gestv2.com/aluvisa.gestv2.com.main (server)'
07-19 13:13:06.179 7786 10322 I GnssLocationProvider: WakeLock acquired by sendMessage(SET_REQUEST, 0, com.android.server.location.GnssLocationProvider$GpsRequest@72e8fdf)
07-19 13:13:06.186 7911 7911 V StatusBar: setLightsOn(true)
07-19 13:13:06.188 7786 9502 I ActivityManager: Process aluvisa.gestv2.com (pid 16539) has died: vis +99TOP
07-19 13:13:06.188 7786 9502 I am_proc_died: [0,16539,aluvisa.gestv2.com,199,2]
07-19 13:13:06.190 7786 7804 W libprocessgroup: kill(-16539, 9) failed: No such process
the code where I enter the text is this

B4X:
Activity.LoadLayout("ComentText")
                        'ACToolBarLight1.Visible=false
               
                        LabelComentClick.Text=Trans.GetText("175")
                        ComentText.Hint=Trans.GetText("176")
                        LabelComentClick.TextSize=14
                        ComentText.Hint=""
                        ComentText.Text=lbl.Text
 

rkxo

Active Member
Licensed User
Yes, it's very strange, I also thought the same thing but it only happens when I load the layout with a text and I click that text very quickly.I try search missing resources
thanks DonManfred.
 

rkxo

Active Member
Licensed User
hi,
I'm in old theme.
There is some way to use the theme 10 sdk environment. with tabs with icons and text (tabhost). in a 28 sdk. old theme type?

my manifest .
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.basic4ppc.com/forum/showthread.php?p=78136
AddManifestText(
'<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="10"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)

SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) 
SetManifestAttribute("android:installLocation", "auto")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:largeHeap, "true")
'SetApplicationAttribute(android:theme, "@style/Theme.Herustyle")
'End of default text.
'SetActivityAttribute(Main, android:theme, "@style/DefaultTheme")
'SetApplicationAttribute(android:theme, "@style/DefaultTheme")

'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
AddPermission("android.permission.SEND_SMS")
AddPermission("android.permission.GET_ACCOUNTS")
AddPermission("android.permission.INTERNET")
AddPermission("android.permission.ACCESS_NETWORK_STATE")
AddPermission(android.permission.MODIFY_AUDIO_SETTINGS)
AddPermission(android.permission.RECORD_AUDIO)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.ACCESS_WIFI_STATE)
AddPermission(android.permission.CHANGE_WIFI_STATE)
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddPermission(android.permission.MANAGE_DOCUMENTS)
AddPermission(android.permission.USE_FINGERPRINT)
'Samsung
AddPermission(com.sec.android.provider.badge.permission.READ)
AddPermission(com.sec.android.provider.badge.permission.WRITE)
'HTC
AddPermission(com.htc.launcher.permission.READ_SETTINGS)
AddPermission(com.htc.launcher.permission.UPDATE_SHORTCUT)
'Sony
AddPermission(com.sonyericsson.home.permission.BROADCAST_BADGE)
AddPermission(com.sonymobile.home.permission.PROVIDER_INSERT_BADGE)
'Apex
AddPermission(com.anddoes.launcher.permission.UPDATE_COUNT)
'Solid
AddPermission(com.majeur.launcher.permission.UPDATE_BADGE)
'Huawei
AddPermission(com.huawei.launcher3.permission.READ_SETTINGS)
AddPermission(com.huawei.launcher3.permission.WRITE_SETTINGS)
AddPermission(com.huawei.launcher2.permission.READ_SETTINGS)
AddPermission(com.huawei.launcher2.permission.READ_SETTINGS)
AddPermission(com.huawei.android.launcher.permission.CHANGE_BADGE)
AddPermission(com.huawei.android.launcher.permission.WRITE_SETTINGS)
AddPermission(com.huawei.android.launcher.permission.READ_SETTINGS)
'Zuk
AddPermission(android.permission.READ_APP_BADGE)
'Oppo
AddPermission(com.oppo.launcher.permission.READ_SETTINGS)
AddPermission(com.oppo.launcher.permission.WRITE_SETTINGS)
'EvMe
AddPermission(me.everything.badger.permission.BADGE_COUNT_READ)
AddPermission(me.everything.badger.permission.BADGE_COUNT_WRITE)

AddManifestText(
<uses-feature android:name="android.hardware.location" android:required="true" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
)

AddReceiverText(PoolGps,
<intent-filter>
    <action android:name="com.rootsoft.rsfluffylocation.littlefluffylocationlibrary.LOCATION_CHANGED" />
    <action android:name="com.rootsoft.rsfluffylocation.littlefluffylocationlibrary.LOCATION_CHANGED_TICK" />
</intent-filter>)

'AddApplicationText(
'<service android:name="com.littlefluffytoys.littlefluffylocationlibrary.LocationBroadcastService" />
'    <receiver android:name="com.littlefluffytoys.littlefluffylocationlibrary.StartupBroadcastReceiver" android:exported="true">
'        <intent-filter>
'            <action android:name="android.intent.action.BOOT_COMPLETED" />
'        </intent-filter>
 '   </receiver>
'<receiver android:name="com.littlefluffytoys.littlefluffylocationlibrary.PassiveLocationChangedReceiver" android:exported="true" />
')
AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />)
  
    SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

AddReceiverText(eu.dgconsulting.appupdating.newinst2,
  <intent-filter>
  <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
    <data android:scheme="package" />
  </intent-filter>)

' Starting from Android 7 (API 24) we pass a file uri using a FileProvider
AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)

AddManifestText(<uses-permission
   android:name="android.permission.WRITE_EXTERNAL_STORAGE"
   android:maxSdkVersion="19" />
)

AddPermission(android.permission.REQUEST_INSTALL_PACKAGES)
thanks
 

Attachments

Last edited:

rkxo

Active Member
Licensed User
how i emulate android 2 theme in sdk theme. Is possible?
in the designer there is the possibility of using old theme. Is there no option to use the old theme in a 28 sdk?
 

rkxo

Active Member
Licensed User
with csbuilder can i to change icon and text position?.
I want to put the text below the icon. it's possible?

how this image

thanks
 

Attachments

Last edited:
Top