android Studio Error: 前言中不允许有内容

原文:http://blog.csdn.net/zhou452840622/article/details/50161059

根据以往在eclipse上的经验,在Android studio上开发的时候也将assets目录放在了src/main/res目录下,build的时候出现如下异常:

[java]  view plain  copy
  1. Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]  
  2.    
  3. Configuration on demand is an incubating feature.  
  4. :app:clean  
  5. :app:preBuild UP-TO-DATE  
  6. :app:preDebugBuild UP-TO-DATE  
  7. :app:checkDebugManifest  
  8. :app:prepareDebugDependencies  
  9. :app:compileDebugAidl  
  10. :app:compileDebugRenderscript  
  11. :app:generateDebugBuildConfig  
  12. :app:generateDebugAssets UP-TO-DATE  
  13. :app:mergeDebugAssets  
  14. :app:generateDebugResValues UP-TO-DATE  
  15. :app:generateDebugResources  
  16. :app:mergeDebugResources  
  17. [Fatal Error] :1:1: 前言中不允许有内容。  

解决方案:

将assets目录移到src/main/ 目录下即可。


原文:http://blog.csdn.net/zhou452840622/article/details/50161059

根据以往在eclipse上的经验,在Android studio上开发的时候也将assets目录放在了src/main/res目录下,build的时候出现如下异常:

[java]  view plain  copy
  1. Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources]  
  2.    
  3. Configuration on demand is an incubating feature.  
  4. :app:clean  
  5. :app:preBuild UP-TO-DATE  
  6. :app:preDebugBuild UP-TO-DATE  
  7. :app:checkDebugManifest  
  8. :app:prepareDebugDependencies  
  9. :app:compileDebugAidl  
  10. :app:compileDebugRenderscript  
  11. :app:generateDebugBuildConfig  
  12. :app:generateDebugAssets UP-TO-DATE  
  13. :app:mergeDebugAssets  
  14. :app:generateDebugResValues UP-TO-DATE  
  15. :app:generateDebugResources  
  16. :app:mergeDebugResources  
  17. [Fatal Error] :1:1: 前言中不允许有内容。  

解决方案:

将assets目录移到src/main/ 目录下即可。


猜你喜欢

转载自blog.csdn.net/qq_28637193/article/details/52925860