当前位置: 首页 > 知识库问答 >
问题:

Eclipse Luna的谷歌插件?

逑何平
2023-03-14

我已经安装了Eclipse Luna 4.4-M6。我尝试为Eclipse 4.3(开普勒)安装谷歌插件,但Eclipse不允许我安装它。

是否有一些方法可以强制安装它(例如通过下载它并编辑一些清单或其他)?或者由于4.3和4.4之间的中断更改,这是徒劳的?

共有3个答案

梁修贤
2023-03-14

这似乎是最近才解决的。

在撰写本文时,我没有在市场上找到该插件,但有一个更新网站:https://dl.google.com/eclipse/plugin/4.4

您可以在以下网站阅读更多信息:https://developers.google.com/eclipse/docs/install-eclipse-4.4

锺离辰沛
2023-03-14

事实证明,有一种方法可以改变清单,允许开普勒的谷歌插件html" target="_blank">安装在Eclipse Luna中。Google Groups上的贡献者Ze Kritter编写了一个Apache Ant构建。执行必要工作的xml文件,此处为原件,下面复制。

它对我来说工作得很好。我已经成功运行了这个脚本并将插件安装到Luna中,并且——至少对于GWT来说——它似乎像往常一样工作。

根据谷歌群组上的讨论线索,Maven插件与Maven存在一些不兼容之处(我个人不使用Maven),一个新的、经过适当测试的谷歌插件不久将推出(2014年7月底)。

<?xml version="1.0" encoding="UTF-8"?>

<project name="gpe.4.luna" basedir="." default="update.end">
    <property environment="env"/>

    <property name="project.base.dir" value="."/>
    <property name="project.temp.dir" value="${project.base.dir}/temp"/>
    <property name="project.plugin.dir" value="${project.base.dir}/plugin"/>
    <property name="project.plugins.dir" value="${project.plugin.dir}/plugins"/>
    <property name="e42.plugin.jar" value="${project.plugins.dir}/com.google.gdt.eclipse.platform.e42_3.6.0.v201406262229-rel-r43.jar"/>
    <property name="artifacts.jar" value="${project.plugin.dir}/artifacts.jar"/>
    <property name="content.jar" value="${project.plugin.dir}/content.jar"/>

    <property name="plugin43.zip" value="com.google.gdt.eclipse.suite.4.3.update.site_3.6.0.zip"/>
    <property name="plugin44.zip" value="com.google.gdt.eclipse.suite.4.4.update.site_3.6.0.zip"/>

    <!--
        source: http://stackoverflow.com/a/5340557/3747097
        Loads entries from a manifest file.

        @jar     The jar from where to read
        @file    A manifest file to read
        @prefix  A prefix to prepend
        @section The name of the manifest section to load
    -->
    <scriptdef name="loadManifest" language="javascript" loaderRef="sharedbuild-loaderRef">
        <attribute name="jar" />
        <attribute name="file" />
        <attribute name="prefix" />
        <attribute name="section" />
        <![CDATA[
            var jarname = attributes.get("jar");
            var filename = attributes.get("file");
            if (jarname != null && filename != null) {
                self.fail("Only one of jar or file is required");
            }
            var prefix = attributes.get("prefix");
            if (prefix == null) {
                prefix = "";
            }
            var section = attributes.get("section");

            var manifest;
            if (jarname != null) {
                var jarfile = new java.util.jar.JarFile(new java.io.File(jarname));
                manifest = jarfile.getManifest();
            } else if (filename != null) {
                manifest = new java.util.jar.Manifest(new java.io.FileInputStream(new java.io.File(filename)));
            } else {
                self.fail("One of jar or file is required");
            }

            if (manifest == null) {
                self.log("No manifest in " + jar);
            } else {
                var attributes = (section == null) ? manifest.getMainAttributes() : manifest.getAttributes(section);
                if (attributes != null) {
                    var iter = attributes.entrySet().iterator();
                    while (iter.hasNext()) {
                        var entry = iter.next();
                        // self.log("key " + entry.getKey());
                        // self.log("value " + entry.getValue());
                        project.setProperty(prefix + entry.getKey(), entry.getValue());
                    }
                }
            }
        ]]>
    </scriptdef>

    <!--
        source: http://giorgio-ferrara.blogspot.ru/2010/09/apache-ant-how-to-search-and-replace.html
    -->
    <macrodef name="replaceStringWithRegExp">
        <attribute name="string"/>
        <attribute name="searchPattern"/>
        <attribute name="replacementPattern"/>
        <attribute name="property"/>
        <sequential>
            <tokens id="id">
                <concat>
                <string value="@{string}"/>
                <filterchain>
                    <tokenfilter>
                        <replaceregex pattern="@{searchPattern}"
                                    replace="@{replacementPattern}"
                                    flags="g"/>
                    </tokenfilter>
                </filterchain>
                </concat>
            </tokens>
            <property name="@{property}" value="${toString:id}"/>
        </sequential>
    </macrodef>

    <target name="clean">
        <delete dir="${project.temp.dir}"/>
        <delete dir="${project.plugin.dir}"/>
        <delete file="${plugin44.zip}"/>
    </target>

    <target depends="clean" name="init">
        <mkdir dir="${project.temp.dir}"/>
    </target>

    <target depends="init" name="check.source">
        <condition property="plugin-not-found">
            <not>
                <available file="${plugin43.zip}"/>
            </not>
        </condition>
    </target>

    <target depends="check.source" name="get.source" if="${plugin-not-found}">
        <get src="https://commondatastorage.googleapis.com/eclipse_toolreleases/products/gpe/release/3.6.0/4.3/com.google.gdt.eclipse.suite.4.3.update.site_3.6.0.zip" dest="."/>
    </target>

    <target depends="check.source, get.source" name="unzip.source">
        <unzip src="${plugin43.zip}" dest="${project.plugin.dir}"/>
    </target>

    <target depends="unzip.source" name="update.manifest">
        <checksum file="${e42.plugin.jar}" property="original.md5"/>
        <loadManifest jar="${e42.plugin.jar}" prefix="e42.mf."/>
        <replaceStringWithRegExp string="${e42.mf.Require-Bundle}"
            searchPattern="(.*);bundle-version=&quot;\[3.8.0,3.10.0\)&quot;(.*)"
            replacementPattern="\1\2"
            property="Require-Bundle"/>
        <!--
        <echo>${e42.mf.Require-Bundle}</echo>
        <echo>${Require-Bundle}</echo>
        -->
        <jar update="true" file="${e42.plugin.jar}">
            <manifest>
                <attribute name="Require-Bundle" value="${Require-Bundle}"/>
            </manifest>
        </jar>
        <checksum file="${e42.plugin.jar}" property="updated.md5"/>
        <!--
        <echo>${original.md5}</echo>
        <echo>${updated.md5}</echo>
        -->
    </target>

    <target depends="update.manifest" name="update.artifacts">
        <delete includeemptydirs="true">
            <fileset dir="${project.temp.dir}" includes="**/*"/>
        </delete>
        <unzip src="${artifacts.jar}" dest="${project.temp.dir}"/>
        <replaceregexp byline="true">
            <regexp pattern="${original.md5}"/>
            <substitution expression="${updated.md5}"/>
            <fileset dir="${project.temp.dir}"/>
        </replaceregexp>
        <zip destfile="${artifacts.jar}" basedir="${project.temp.dir}"/>
    </target>

    <target depends="update.artifacts" name="update.content">
        <delete includeemptydirs="true">
            <fileset dir="${project.temp.dir}" includes="**/*"/>
        </delete>
        <unzip src="${content.jar}" dest="${project.temp.dir}"/>
        <replaceregexp byline="true">
            <regexp pattern="name='org.eclipse.core.runtime' range='\[3.8.0,3.10.0\)'"/>
            <substitution expression="name='org.eclipse.core.runtime' range='0.0.0'"/>
            <fileset dir="${project.temp.dir}"/>
        </replaceregexp>
        <zip destfile="${content.jar}" basedir="${project.temp.dir}"/>
    </target>

    <target depends="update.content" name="create.updated.plugin">
        <zip destfile="${plugin44.zip}" basedir="${project.plugin.dir}"/>
        <delete dir="${project.temp.dir}"/>
        <delete dir="${project.plugin.dir}"/>
    </target>

    <target depends="create.updated.plugin" name="update.end">
        <echo message="plugin rebuild success"/>
    </target>

</project>

我将在此处添加单词Eclipse Mars,因此可以通过搜索找到此解决方案,并可能针对2015年6月发布的Eclipse进行调整。

郎建章
2023-03-14

根据Eclipse社区论坛的Google插件,我们可能会在7月中旬看到一个支持Luna的新插件。

https://groups.google.com/forum/#!topic/google插件eclipse/4YACQROrB2U

 类似资料:
  • 我是谷歌应用引擎的新手。要使用Java App Engine,Google提供了两个选项:创建一个Maven项目,或者由Eclipse Google插件支持的非Maven项目。根据文档,Eclipse版本更容易。那么我应该继续日食吗?但是我看到了很多关于maven的帖子。有人能评论一下使用Maven的利弊吗。 谢谢

  • 最终解决方案 我只是个白痴。增加版本后的真正问题是,我已经应用了插件而不是在文件末尾。检查这个主题,我之前搜索得很糟糕 原始问题 我从来都不明白Gradle是怎么工作的,很抱歉问了一些愚蠢的问题。 我正面临一个问题,我不知道问题出在哪里,也不知道现在该怎么办。我有GCM的应用程序,一切都很好,直到我们添加了第二语言的应用程序。 然后我得到一个错误,即< code>google_app_id没有被翻

  • 是否有一种方法,我可以有一个Maven兼容的谷歌应用引擎(Java)项目,也与Eclipse内的谷歌Eclipse插件兼容? 谢谢 编辑: 现在对Maven插件的本机支持: https://developers.google.com/appengine/docs/java/tools/maven

  • 我尝试过将deendpoint与云SQL和Hibernate集成。但是,每次都有错误。跟随我的测试: 1 -源文件夹中的persistence . XML:http://imgur.com/hKjf8Cs给我错误:http://imgur.com/QJe8rvq 2-资源文件夹中的persistence.xml给我错误: ServletInitializationParameters.java:5

  • 我正在开发一个网络应用程序,代表用户获取谷歌广告活动的信息。我使用的是谷歌提供的python库,但我在获取开始测试API调用的初始凭据时遇到了很多麻烦。 我遵循以下文件:https://github.com/googleads/google-ads-python/wiki/OAuth-Web-Application-Flow 我已经完成了第一步,我有我的客户机密码、客户机ID和重定向uri。 在第

  • 介绍如何在谷歌云平台获取在云联壹云平台需要使用的配置参数。 如何获取谷歌云服务帐号密钥信息? 纳管指定项目 打开“GCP Console中的IAM和管理-IAM页面”页面并登录。 单击顶部“选择项目”,选择需要授权的项目。 在左侧导航栏中选择“服务账号”,进入指定项目的服务账号页面。 单击 “创建服务账号” 按钮,进入创建服务账号页面。 配置服务账号名称、服务账号ID、服务账号说明等,单击 “创建