Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アプリのアセット フォルダーにファイルがあります。コンテキスト インスタンスなしでこのファイルを使用する方法はありますか?
いいえ、コンテキストが必要です。一部の静的コンテキストを除いて、常にアプリ内のコンテキストにアクセスできる必要があることに注意してください。別の投稿者が指摘したように、ユーティリティ クラス/メソッド内からのコンテキスト アクセスが必要な場合は、単に Context をメソッドのパラメーターにする必要があります。