Because you want to implement a platform that edits from the front end and then automatically produces the APK, you first need to take care of the auto-generate APK feature. After studying the 7 steps of the APK generation, it was found that a slightly more complicated program, especially the Res folder with subfolders, could not be implemented directly with the SDK commands, so the ant implementation was chosen, and the first was intended to use native ant, That is, you need to write build.xml, after trying several times found inside there are several temporary unresolved bugs: one is that at compile time will be reported android.support.annotation not find the package, the second is to generate Dex file will be reported already added error, The first error can be resolved by modifying the program, but the second error is the problem of repeatedly referencing the package, and attempting to remove the jar package is temporarily unresolved.
Accidentally found an ant folder in the SDK, and then search the Internet to use the SDK ant packaging apk, the steps are as follows:
1.android Update Project--name XXXX--target 4--path.
(xxxx is the project name, 4 is listed by Android list targets the applicable targets, then choose a suitable one.) )
After executing this command, the following files are updated and generated under the Programs folder:
Generally will be project.properties inside the Proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt This line before the # is removed.
2.ant Debug
After that, you can find xxxx-debug.apk in the Bin folder.
The steps are simple, because the vast majority of things have been done by Ant. But it takes time and effort to start researching apk generation steps and manually writing build.xml, especially debugging bugs ...
This is just a debug version, and it's still a distance from fully automated compilation and package generation.
Using the SDK to bring your own ant package build apk