`

the resource is not on the build path of a php project

 
阅读更多

感谢作者,原文地址:http://blog.csdn.net/qinglianluan/article/details/30068491

一个工程已经存在了,例如叫myproject然后你将其导入了eclipse中, 无论你是通过import实现的还是通过new了一个相同名字的myproject并且在相同的workspace下,实现项目的导入, 你都可能遇到一个麻烦, 就是当你按住 'Ctrl'键并且点击一个集成的类或方法时 会提示the resource is not on the build path of a php project

那么怎么办呢:找到你的工程文件位置, 例如我的工程myproject下肯定有一个文件“.project” 用记事本打开它你会看到

 

<projectDescription>
    <name>myproject</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    </buildSpec>
    <natures>
    </natures>
</projectDescription>

 

将其全部替换为:

 

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>myproject</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>net.sourceforge.phpeclipse.parserbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.dltk.core.scriptbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.zend.php.zendserver.deployment.core.DeploymentBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.php.core.PHPNature</nature>
        <nature>org.zend.php.zendserver.deployment.core.DeploymentNature</nature>
        <nature>net.sourceforge.phpeclipse.phpnature</nature>
    </natures>
</projectDescription>

 

注意eclipse的本班不同这个xml文件可能会有差异,那么怎么办呢, 你只需要创建一个新的工程, 然后将其生成的“.project”文件 里的内容复制下, 然后替换你的目的工程的“.project”文件 并作小小的改动将<name>your project name<name>就可以了

 

 

分享到:
评论

相关推荐

    解决The project cannot be built until build path

    解决 Eclipse 中“项目无法构建直到build path”问题 Eclipse 是一个功能强大且流行的集成开发环境(IDE),广泛应用于 Java Web 开发中。但是在使用 Eclipse 进行项目开发时,经常会遇到“项目无法构建直到build ...

    Xcode_Build_Setting_Reference

    It is used to separate the output of different targets within a project. ##### TARGET_TEMP_DIR This setting determines the directory for temporary files generated for the target. Temporary files can...

    PythonRobotics a Python code collection of robotics algorithms.pdf

    PythonRobotics is not just a collection of algorithms but also serves as an educational resource. It provides a hands-on approach to learning about autonomous navigation technologies. By offering well...

    ICS delphixe10源码版

    ICS V8 is the current development release which is held in a public Version Control repository that is zipped each night for easy download. The download page above also includes the OpenSSL binaries ...

    RxLib控件包内含RxGIF,全部源码及DEMO

    TRxMemoryData is a in-memory dataset that mimics the behaviors of a regular Delphi dataset. Unlike TMemoryTable component, TRxMemoryData is BDE independent. This means it can still be used by any ...

    apktool documentation

    unknown = Files / folders that are not part of the standard AOSP build procedure. These files will be injected back into the rebuilt APK. apktool.yml collects more information than last version ...

    EhLib 9.1.024

    To install a new version of the library in the IDE, use the installation program .\Installer\EhLibInstaller.exe If, at the installation have any problems, write a letter to ehlib support address ...

    ehlib_vcl_src_9_3.26

    To install a new version of the library in the IDE, use the installation program .\Installer\EhLibInstaller.exe If, at the installation have any problems, write a letter to ehlib support address ...

    HTML5.and.CSS3.Building.Responsive.Websites.pdf

    Packed with examples and a thorough explanation of modern techniques and syntax, the second module provides a comprehensive resource for all things “responsive.” You'll explore the most up-to-date ...

    ebook-flutter-revolution.pdf

    course offers a comprehensive guide to getting started with Flutter, covering everything from the basics of the framework and the Dart programming language to setting up development environments on ...

    Delphi7.1 Update

    * When using RefreshRecord on a Memo or Blobfield and the field has been modified by another user, the blobsize of that field does not change if it is less than before (Quality Central 4676).* ...

    Professional.MFC.with.VC6

    Easing the Build Process Using Dynamic-link Libraries with C++ Name Mangling Alternative Calling Conventions Using and Writing DLLs with MFC MFC DLL Models Summary of DLL Models About DLLApp ...

    Java - The Well-Grounded Java Developer

    - **Path and Files API**: Overview of the `Paths` and `Files` classes, which provide a high-level interface for working with file system paths and performing common file operations. - **Asynchronous...

    Clever Internet Suite (SRC) v9.1.0.0

    With SMTP relay, a mail message may pass through a number of intermediate relay or gateway hosts on its path from sender to recipient. HTML Parser - parse HTML Tags: links, images, tables, meta tags ...

    m6a—insight

    CMake Error: The current CMakeCache.txt directory C:/DC105_Dupli.SearchResults/build/CMakeCache.txt is different than the directory c:/D/DC105_xxxx/trunk/build where CMakeCache.txt was created....

    Delphi-OpenCV

    Add the search path for the modules of the project in Delphi IDE (Tools-Options-Delphi Options-Library-Library path) &lt;PROJECT_ROOT&gt;\source &lt;PROJECT_ROOT&gt;\source\utils &lt;PROJECT_ROOT&gt;\source\component ...

    spring-boot-reference.pdf

    Changing the H2 Console’s Path 29.5. Using jOOQ 29.5.1. Code Generation 29.5.2. Using DSLContext 29.5.3. jOOQ SQL Dialect 29.5.4. Customizing jOOQ 30. Working with NoSQL Technologies 30.1. Redis ...

    EurekaLog_7.5.0.0_Enterprise

    18)..Fixed: Possible "Unit XYZ was compiled with a different version of ABC" when using packages 19)..Fixed: FastMM shared MM compatibility 20)..Fixed: Minor bugs in stack tracing (which usually ...

    解决异常FileNotFoundException:class path resource找不到资源文件的问题

    在Eclipse中,点击`Project` &gt; `Clean...`,然后选择`Build Automatically`选项,这将触发项目的重新编译。确认资源文件在编译完成后出现在正确的目录下。 3. 检查第三方工具或插件 如果你使用了如Maven或Gradle...

Global site tag (gtag.js) - Google Analytics