プロジェクトの 1 つで google-play-services_lib ライブラリを使用しています。日食ではすべてが美しく構築されます。ここで、プロジェクトを自動的にビルドする Android.mk ファイルを書きたいと思います。
hereの指示に従って、ライブラリ プロジェクトをプロジェクトの libs フォルダーにLOCAL_LDLIBS
配置して Android.mk に追加しましたが、機能しません。google-play-services_lib
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := GoogleReviews
LOCAL_LDLIBS := -L/libs/google-play-services_lib
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
include $(BUILD_MULTI_PREBUILT)
ライブラリが Android.mk から正しく検出されないため、コンパイル中に例外が発生し、google-play-services_lib
ライブラリ内の欠落しているクラスが参照されます。
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:36: package com.google.android.gms.auth does not exist
import com.google.android.gms.auth.GoogleAuthUtil;
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:37: package com.google.android.gms.common does not exist
import com.google.android.gms.common.AccountPicker;
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:38: package com.google.android.gms.common does not exist
import com.google.android.gms.common.ConnectionResult;
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:39: package com.google.android.gms.common does not exist
import com.google.android.gms.common.GooglePlayServicesUtil;
^
Copying: out/target/common/obj/JAVA_LIBRARIES/jp.co.sharp.android.model.orange_sh70f_intermediates/noproguard.classes.dex
target Jar: jp.co.sharp.android.model.orange_sh70f (out/target/common/obj/JAVA_LIBRARIES/jp.co.sharp.android.model.orange_sh70f_intermediates/javalib.jar)
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:110: cannot find symbol
symbol : variable AccountPicker
location: class com.example.appreviews.ReviewScreen
Intent intent = AccountPicker.newChooseAccountIntent(null, null,
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:132: cannot find symbol
symbol : variable GooglePlayServicesUtil
location: class com.example.appreviews.ReviewScreen
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:134: cannot find symbol
symbol : variable ConnectionResult
location: class com.example.appreviews.ReviewScreen
case ConnectionResult.SUCCESS:
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:138: cannot find symbol
symbol : variable ConnectionResult
location: class com.example.appreviews.ReviewScreen
case ConnectionResult.SERVICE_MISSING:
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:141: cannot find symbol
symbol : variable ConnectionResult
location: class com.example.appreviews.ReviewScreen
case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:145: cannot find symbol
symbol : variable ConnectionResult
location: class com.example.appreviews.ReviewScreen
case ConnectionResult.SERVICE_DISABLED:
^
packages/apps/GoogleReviews/src/com/example/appreviews/ReviewScreen.java:261: cannot find symbol
symbol : variable GoogleAuthUtil
location: class com.example.appreviews.ReviewScreen
GoogleAuthUtil.invalidateToken(this, token);
^
11 errors
このエラーを取り除くことができるように、何をする必要がありますか。
どんな助けでも大歓迎です。