有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java 安卓源代码构建应用找不到安卓supportv4。罐子

我在下面找到jar库:out/target/product/g32ref/obj/JAVA_LIBRARIES/安卓-support-v4_intermediates/javalib。罐子

在设置应用程序中,Android。mk是这样的:

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

LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := guava 安卓-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程序包/应用程序/设置”构建它时,它将生成错误。你知道安卓 building命令在哪里设置安卓-support-v4 jar吗?为什么找不到v4支持jar

packages/apps/Settings/src/com/安卓/settings/applications/ManageApplications.java:50: cannot find symbol
symbol  : class PagerTabStrip
location: package 安卓.support.v4.view
import 安卓.support.v4.view.PagerTabStrip;
                              ^
packages/apps/Settings/src/com/安卓/settings/applications/ManageApplications.java:889: cannot find symbol
symbol  : class PagerTabStrip
location: class com.安卓.settings.applications.ManageApplications
        PagerTabStrip tabs = (PagerTabStrip) rootView.findViewById(R.id.tabs);
        ^
packages/apps/Settings/src/com/安卓/settings/applications/ManageApplications.java:889: cannot find symbol
symbol  : class PagerTabStrip
location: class com.安卓.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) 个答案

  1. # 1 楼答案

    尝试执行以下步骤

    一,。可能是您的调试证书已过期,所以您只需要删除~/。android/debug。密钥存储并重新启动Eclipse,一切都应该正常

    二,。可能它正在这里寻找jar:/Applications/eclipse/eclipse。app/Contents/MacOS/v4/android-support-v4。罐子

    android-support-v4。jar位于/extras/android/compatibility/v4中

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