我尝试使用此Kotlin代码:
File "/home/bsd/.virtualenvs/BSD/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/bsd/.virtualenvs/BSD/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/home/bsd/.virtualenvs/BSD/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/bsd/.virtualenvs/BSD/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
21. return view_func(request, *args, **kwargs)
File "/home/bsd/PycharmProjects/BSD/BSD_3_1/tifact/views.py" in update
465. if isinstance(request.session['initial_files'], basestring): # if this is a file path, we know it is a large file
Exception Type: NameError at /tifact/update/submit/1515
Exception Value: name 'basestring' is not define
为什么不起作用?我该如何解决?
这可能是一个非常基本的问题,但我不是应用程序开发人员。我不知道这种语言的范围。
请帮助我。
答案 0 :(得分:1)
findViewById()是“活动”或“片段”的方法。 您可以通过父活动或片段传递Web视图引用,并在 showToast()方法中使用。
class WebAppInterface(私有val mContext:上下文,私有val web:WebView){ }