我正在尝试让Codename One在我的Ubuntu机器上本地工作,这样我就不必将构建发送到codenameone.com。我按照本教程中的步骤进行操作:
http://sjhannah.com/blog/?p=228
并成功安装。当我进入我的项目目录并运行:
ant build-for-android-device-locally
我收到以下错误:
/home/petr/projects/MyApp/dist/android/src/com/codename1/social/FacebookImpl.java:37: error: package com.facebook does not exist
所以我下载了facebook sdk,使用Gradle编译它,并将生成的facebook JAR文件添加到我的/etc/bash.bashrc文件中的CLASSPATH变量中:
CLASSPATH="/home/petr/android-sdk-linux/platforms/android-21/android.jar:/home/petr/projects/MyApp/lib/CLDC11.jar:/home/petr/projects/MyApp/lib/CodenameOne_SRC.zip:/home/petr/projects/MyApp/lib/CodenameOne.jar:/home/petr/android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar:/home/petr/android-sdk-linux/facebook-android-sdk-3.23.0/facebook/build/libs/facebook-3.23.0-sources.jar"
export CLASSPATH
然后我关闭了我的终端,再次重新打开它并尝试再次使用ant构建,但我一直都在使用#34; com.facebook不存在"错误。为什么java不识别JAR文件?