我不認爲這是重複的,因爲我一直無法找到一個解決方案,在這裏在stackoverflow和其他網站/論壇。我列出了我嘗試過的所有內容,並且沒有在下面工作。com/sencha/core/functional /操作:不支持的major.minor版本與java的版本爲51 1.8.0
我想在OSX El Capitain的終端上運行命令「sencha app build native」,並且遇到以下錯誤。
Sencha Cmd v6.1.3.42
[INF] Using GPL version of Sencha Touch version 2.3.0 from /Users/myuser/Downloads/MyProject_2/touch.
[INF] The implications of using GPL version can be found here (http://www.sencha.com/products/extjs/licensing).
[INF] Processing Build Descriptor : native
[INF] Loading app json manifest...
[INF] Writing output to file /Users/myuser/Downloads/MyProject_2/build/temp/production/MyProject/sencha-compiler/cmd-packages.js
[INF] writing content to /Users/myuser/Downloads/MyProject_2/bootstrap.js
[INF] appending content to /Users/myuser/Downloads/MyProject_2/bootstrap.js
[INF] appending content to /Users/myuser/Downloads/MyProject_2/bootstrap.js
[INF] appending content to /Users/myuser/Downloads/MyProject_2/bootstrap.js
[INF] Appending content to /Users/myuser/Downloads/MyProject_2/bootstrap.json
[WRN] C1014: callParent has no target (me.callParent in Ext.dataview.DataView.onAfterRender) -- /Users/myuser/Downloads/MyProject_2/touch/src/dataview/DataView.js:892
[WRN] C1014: callParent has no target (this.callParent in Ext.Decorator.setDisabled) -- /Users/myuser/Downloads/MyProject_2/touch/src/Decorator.js:157
[WRN] C1014: callParent has no target (this.callParent in Ext.data.ArrayStore.loadData) -- /Users/myuser/Downloads/MyProject_2/touch/src/data/ArrayStore.js:64
[WRN] C1014: callParent has no target (this.callParent in Ext.fx.animation.Wipe.getData) -- /Users/myuser/Downloads/MyProject_2/touch/src/fx/animation/Wipe.js:119:7
[INF] Writing concatenated output to file /Users/myuser/Downloads/MyProject_2/cordova/www/app.js
[INF] merging 0 input resources into /Users/myuser/Downloads/MyProject_2/cordova/www/resources
[INF] merged 0 resources into /Users/myuser/Downloads/MyProject_2/cordova/www/resources
[INF] merging 46 input resources into /Users/myuser/Downloads/MyProject_2/cordova/www
[INF] merged 0 resources into /Users/myuser/Downloads/MyProject_2/cordova/www
[INF] writing content to /Users/myuser/Downloads/MyProject_2/sass/example/bootstrap.js
[INF] appending content to /Users/myuser/Downloads/MyProject_2/sass/example/bootstrap.js
[INF] appending content to /Users/myuser/Downloads/MyProject_2/sass/example/bootstrap.js
[INF] appending content to /Users/myuser/Downloads/MyProject_2/sass/example/bootstrap.js
[INF] appending content to /Users/myuser/Downloads/MyProject_2/sass/example/bootstrap.js
[ERR]
[ERR] BUILD FAILED
[ERR] java.lang.UnsupportedClassVersionError: com/sencha/core/functional/Action : Unsupported major.minor version 51.0
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCom
[ERR] mand.dispatch(BasePluginCommands.java:260)
[ERR]
[ERR] Total time: 7 seconds
[ERR] The following error occurred while executing this line:
/Users/myuser/Downloads/MyProject_2/.sencha/app/build-impl.xml:285: The following error occurred while executing this line:
/Users/myuser/Downloads/MyProject_2/.sencha/app/sass-impl.xml:310: The following error occurred while executing this line:
/Users/myuser/Downloads/MyProject_2/.sencha/app/sass-impl.xml:316: com.sencha.exceptions.BasicException: com/sencha/core/functional/Action : Unsupported major.minor version 51.0
該錯誤告訴我,我的Java安裝程序有問題,但我不知道什麼。在終端中檢查我的版本顯示以下內容。
$ Java的版本 Java版本 「1.8.0_101」 的Java(TM)SE運行時環境(建1.8.0_101-B13) 的HotSpot的Java(TM)64位服務器VM(25.101建設-B13,混合模式)
通過系統預置開放的Java顯示只安裝了一個Java版本是1.8與'/庫/互聯網插件/ JavaAppletPlugin.plugin /內容/首頁/斌/ Java的
安裝路徑在終端中運行'/ Library/Internet \ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version'也顯示版本1.8
運行'/ usr/bin/java -version'也給出版本1.8
我已經嘗試添加這3行的變體以嘗試解決問題,但它似乎沒有改變任何東西。正如你可以看到我也試圖改變存儲以防萬一這可能是內存問題
ANT_OPTS="-Xms1024m -Xmx2048m"
export PATH="/usr/local/bin:$PATH"
export JAVA_HOME="/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"
我也嘗試運行「煎茶的應用程序建立-c」這給了同樣的錯誤。
我也嘗試添加下列到sencha.cfg,看它是否可能幫助
cmd.jvm.args=-Xms512m -Xmx2048m
我也試着從蘋果https://support.apple.com/kb/dl1572它說,它安裝的Java 6的運行舊版本的安裝此更新
我也嘗試安裝Java SDK的7和Java SDK的8看看有沒有什麼幫助,沒有運氣
我還可以嘗試以修復錯誤「不支持MAJOR.MINOR版本51.0」做[R elating到煎茶建立
也許在您的pom中聲明瞭錯誤的目標版本? – Jens
@Jens對不起,我主要是一名php開發人員,我沒有在我的項目文件夾中看到一個pom.xml文件。我在哪裏可以找到這個設置? – Matkey