简体   繁体   English

如何从 APK 文件中恢复 Gradle 文件?

[英]How to recover Gradle files from APK file?

I've succeeded in recovering the Java files and XML files from an APK file using this tutorial but I cannot find the Gradle scripts( build.gradle, settings gradle, local.properties, etc.)我已经使用教程成功地从 APK 文件中恢复了 Java 文件和 XML 文件,但我找不到 Gradle 脚本(build.gradle、settings gradle、local.properties 等)

I've created a new project and I had imported the Java and XML files but the project doesn't work, I guess because of the Gradle.我创建了一个新项目,并导入了 Java 和 XML 文件,但该项目不起作用,我猜是因为 Gradle。

Does anyone know how to do this?有谁知道如何做到这一点?

The gradle file is not compiled into the APK, it is only for the actual android studio project for fetching dependencies and app configuration. gradle 文件没有被编译进 APK,它只用于实际的 android studio 项目,用于获取依赖项和应用程序配置。 There is no way to get a gradle file from an APK无法从 APK 获取 gradle 文件

Try creating your own folders in the studio and try copying the code into the studio....that should work...and about gradle files?尝试在工作室中创建您自己的文件夹并尝试将代码复制到工作室中....那应该可以工作...关于 gradle 文件? android studio will build it with gradle...as much as i know studio uses gradle build system to build app android studio 将使用 gradle 构建它......据我所知,studio 使用 gradle 构建系统来构建应用程序

you can't .你不能。 when you compile apk it will merge all the file into single file .当您编译 apk 时,它会将所有文件合并为单个文件。 An APK file contains all of that program's code (such as .dex files), resources, assets, certificates, and manifest file. APK 文件包含该程序的所有代码(例如 .dex 文件)、资源、资产、证书和清单文件。

So When You decompile it .所以当你反编译它时。 you can not file gradle file .你不能归档 gradle 文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM