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

CRASH when trying to add drawable media. #1853

Open
5 tasks done
PrashantRawatCoder opened this issue Jul 25, 2024 · 0 comments
Open
5 tasks done

CRASH when trying to add drawable media. #1853

PrashantRawatCoder opened this issue Jul 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@PrashantRawatCoder
Copy link

Issue Checklist

  • I confirm that this issue is not a duplicate and hasn't been reported before.
  • I agree to follow the project's code of conduct.
  • I have checked and verified that I am using the latest version of AndroidIDE from GitHub or F-Droid.

Additional terms

  • I understand that providing incomplete or inaccurate information may result in the issue being closed.
  • I agree to provide all requested details promptly for a comprehensive bug report.

Issue explanation

I was trying to add media file in main activity.xml file , in a image view I added src=@android:preloaded_drawable/o and I crashed.
but I had o.png in my drawable folder.

Expected behavior

I should have showed error if I was coding it wrong way.

Version name

AndroidIDE Crash Report
Version : v2.7.1-beta (27102)
CI Build : false
Branch : HEAD
Commit : 55bb46b
Variant : arm64-v8a (release)
Build type : OFFICIAL
F-Droid Build : true
F-Droid Version : v2.7.1-beta
F-Droid Version code : 27102
SDK Version : 29
Supported ABIs : [arm64-v8a, armeabi-v7a, armeabi]
Manufacturer : Xiaomi
Device : Redmi8

Download source

F-Droid

Relevant log output

AndroidIDE Crash Report
Version : v2.7.1-beta (27102)
CI Build : false
Branch : HEAD
Commit : 55bb46b31
Variant : arm64-v8a (release)
Build type : OFFICIAL
F-Droid Build : true
F-Droid Version : v2.7.1-beta
F-Droid Version code : 27102
SDK Version : 29
Supported ABIs : [arm64-v8a, armeabi-v7a, armeabi]
Manufacturer : Xiaomi
Device : Redmi8

Stacktrace:
java.lang.IllegalArgumentException: ARRAY resource 'preloaded_drawables/o' not found
	at com.itsaky.androidide.inflater.internal.utils.BasicParseUtilsKt.resolveResourceReference(SourceFile:5)
	at com.itsaky.androidide.inflater.internal.utils.BasicParseUtilsKt.parseReference(Unknown Source:114)
	at com.itsaky.androidide.inflater.AbstractParser.parseDrawable(SourceFile:10)
	at com.itsaky.androidide.inflater.AbstractParser.parseDrawable$default(Unknown Source:14)
	at com.itsaky.androidide.inflater.internal.adapters.ImageViewAdapter$createAttrHandlers$1.invoke(SourceFile:10)
	at com.itsaky.androidide.inflater.internal.adapters.ImageViewAdapter$createAttrHandlers$1.invoke(SourceFile:28)
	at com.itsaky.androidide.inflater.IViewAdapter.applyInternal(Unknown Source:23)
	at androidx.work.JobListenableFuture$1.invoke(SourceFile:210)
	at com.itsaky.androidide.inflater.IViewAdapter.apply(Unknown Source:78)
	at com.itsaky.androidide.inflater.internal.ViewImpl.applyAttribute(Unknown Source:38)
	at com.itsaky.androidide.inflater.internal.ViewImpl.updateAttribute(Unknown Source:39)
	at com.itsaky.androidide.uidesigner.viewmodel.WorkspaceViewModel.notifyAttrUpdated(Unknown Source:121)
	at com.itsaky.androidide.uidesigner.fragments.ViewInfoSheet.onDismiss(Unknown Source:27)
	at androidx.fragment.app.DialogFragment$3.onDismiss(Unknown Source:6)
	at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1409)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7562)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
@PrashantRawatCoder PrashantRawatCoder added the bug Something isn't working label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant