我想訪問隱藏的API的Android 5.1(22),但我很難讓項目編譯。我所採取的步驟:訪問Android 5.1內部API的
- 運行5.1
- 冉oat2dex得到DEX的設備和ODEX文件夾
- 拉boot.oat然dex2jar上framework.dex和框架,classes2.dex,得到了兩種工作就像一個魅力after modifying classes2.dex so dex2jar would run
- 合併了兩個結果文件夾,複製其內容
- 在/平臺/ Android的22,解壓縮後的android.jar,複製了前一步驟中的文件,拉鍊拉上備份
- Android Stu DIO無效緩存,並重啓
- 清潔工程
現在我得到一個應用程序:processDebugResources錯誤:
錯誤:執行失敗的任務 ':應用程序:processDebugResources'。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
即使--stacktrace和--debug運行後,誤差並不明顯黯然。我已經閱讀了整個互聯網,試圖找出問題可能是什麼,但沒有運氣。我gradle這個文件是這樣的:
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "<ID>"
minSdkVersion 19
targetSdkVersion 22
versionCode 0
versionName "0.3"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
preDexLibraries = false /*Include these three statements to build app quickly (at least faster than before :p) */
javaMaxHeapSize "4g" // To avoid GC Limit Exception
jumboMode = true // To avoid GC Limit Exception
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:recyclerview-v7:22.0.0'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'com.google.android.gms:play-services-base:6.5.87'
compile 'com.google.android.gms:play-services-location:6.5.87'
compile 'org.androidannotations:androidannotations-api:3.3.2'
apt 'org.androidannotations:androidannotations:3.3.2'
compile 'com.android.support:multidex:1.0.1'
}
我試圖創建一個新的項目和編譯,再同樣的錯誤,所以我相當肯定它不是設置/依賴性。我正在使用gradle build 1.2.3,我嘗試了不同的版本,同樣的錯誤。
在這一點上,我真的不知道還有什麼嘗試 - 任何幫助將不勝感激!