嘗試使用毫米構建apk時出現以下錯誤。編譯android rom中的應用程序時出錯。 (APK空)
Reading program jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/APPS/HelloWorld_intermediates/classes.jar]
Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jar]
Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar]
Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar]
Reading library jar [/Volumes/untitled/WORKING_DIRECTORY/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar]
Error: The output jar is empty. Did you specify the proper '-keep' options?
make: *** [out/target/common/obj/APPS/HelloWorld_intermediates/proguard.classes.jar] Error 1
#### make failed to build some targets (20 seconds) ####
這些都是我make文件的內容Android.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := HelloWorld
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))
這是我AndroidManifest.xml中
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.helloworld" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".HelloWorld"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.APP_HELLOWORLD" />
</intent-filter>
</activity>
</application>
</manifest>
該應用程序在上面正常編譯android studio。要在我用來編譯Rom的相同環境中進行編譯,我必須刪除預編譯的R文件。任何可以幫助編譯這個應用程序的建議?
嘿人!我可以得到一些幫助嗎? – fahad