com.android.builder.internal.aapt.v2.Aapt2Exception:Android资源链接失败

时间:2019-08-03 06:35:18

标签: android android-studio android-resources

Android资源链接失败 F:\ New文件夹\ BikhuApp \ app \ build \ Generated \ not_namespaced_r_class_sources \ debug \ processDebugResources \ r \ com \ adhoc \ ctnrbuzz \ balaapp \ R.java:错误:无效的符号名称'com.adhoc.ctnrbuzz.balaapp:id /空”。

com.android.builder.internal.aapt.v2.Aapt2Exception:Android资源链接失败 F:\ New文件夹\ BikhuApp \ app \ build \ Generated \ not_namespaced_r_class_sources \ debug \ processDebugResources \ r \ com \ adhoc \ ctnrbuzz \ balaapp \ R.java:错误:无效的符号名称'com.adhoc.ctnrbuzz.balaapp:id /空”。

def session_options(enable_gpu_ram_resizing=True):
  """Convenience function which sets common `tf.Session` options."""
  config = tf.ConfigProto()
  config.log_device_placement = True
  if enable_gpu_ram_resizing:
    # `allow_growth=True` makes it possible to connect multiple colabs to your
    # GPU. Otherwise the colab malloc's all GPU ram.
    config.gpu_options.allow_growth = True
  return config

def reset_sess(config=None):
  """Convenience function to create the TF graph and session, or reset them."""
  if config is None:
    config = session_options()
  tf.reset_default_graph()
  global sess
  try:
    sess.close()
  except:
    pass
  sess = tf.InteractiveSession(config=config)

reset_sess()


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-8f3c54a802d4> in <module>()
     21   sess = tf.InteractiveSession(config=config)
     22 
---> 23 reset_sess()

1 frames
<ipython-input-8-8f3c54a802d4> in reset_sess(config)
     12   """Convenience function to create the TF graph and session, or reset them."""
     13   if config is None:
---> 14     config = session_options()
     15   tf.reset_default_graph()
     16   global sess

<ipython-input-8-8f3c54a802d4> in session_options(enable_gpu_ram_resizing)
      1 def session_options(enable_gpu_ram_resizing=True):
      2   """Convenience function which sets common `tf.Session` options."""
----> 3   config = tf.ConfigProto()
      4   config.log_device_placement = True
      5   if enable_gpu_ram_resizing:

AttributeError: module 'tensorflow' has no attribute 'ConfigProto'

1 个答案:

答案 0 :(得分:0)

尝试从Android Studio菜单File->Invalidate Caches/Restart->Invalidate and Restart