android源码构建应用程序找不到android-support-v4.jar

时间:2014-03-17 06:53:15

标签: java android

我在这里找到jar库:out / target / product / g32ref / obj / JAVA_LIBRARIES / android-support-v4_intermediates / javalib.jar

在“设置”应用中,Android.mk是这样的:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4 jsr305
ifdef DOLBY_DAP
LOCAL_JAVA_LIBRARIES += framework_ext
else
LOCAL_STATIC_JAVA_LIBRARIES += libsds
endif #DOLBY_DAP

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := Settings
LOCAL_CERTIFICATE := platform

LOCAL_PROGUARD_FLAG_FILES := proguard.flags
include $(BUILD_PACKAGE)

ifndef DOLBY_DAP
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libsds:ds.jar
include $(BUILD_MULTI_PREBUILT)
endif

# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))

但是,当“mmm -B packages / app / Settings”构建它时,它将构建错误。你知道android build命令在哪里找到android-support-v4 jar吗?为什么不能找到v4-support jar?

packages/apps/Settings/src/com/android/settings/applications/ManageApplications.java:50: cannot find symbol
symbol  : class PagerTabStrip
location: package android.support.v4.view
import android.support.v4.view.PagerTabStrip;
                              ^
packages/apps/Settings/src/com/android/settings/applications/ManageApplications.java:889: cannot find symbol
symbol  : class PagerTabStrip
location: class com.android.settings.applications.ManageApplications
        PagerTabStrip tabs = (PagerTabStrip) rootView.findViewById(R.id.tabs);
        ^
packages/apps/Settings/src/com/android/settings/applications/ManageApplications.java:889: cannot find symbol
symbol  : class PagerTabStrip
location: class com.android.settings.applications.ManageApplications
        PagerTabStrip tabs = (PagerTabStrip) rootView.findViewById(R.id.tabs);
                              ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
make: *** [out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar] Error 41
make: Leaving directory `/home/lee/develop/tanghui/dhcp_ali'

1 个答案:

答案 0 :(得分:0)

尝试执行以下步骤

1.可能你的调试证书已经过期,所以你只需删除〜/ .android / debug.keystore并重新启动Eclipse,一切都应该有效。

2.可能在这里寻找jar:/Applications/eclipse/Eclipse.app/Contents/MacOS/v4/android-support-v4.jar

android-support-v4.jar位于/ extras / android / compatibility / v4

请确保在java构建路径中将其添加为外部jar。