Solve the thinking that Android studio introduced the Eclipse dependency project on SVN without real-time updates
tags (space delimited): Androidstudio SVN
The use of Android Stuido has been developed for several months, using Libs/jar to rely on external libraries, and recently new requirements depend on engineering. Using SVN for versioning, and depending on the project for the Eclipse Project, a problem was found during development: as a module-dependent project, you cannot directly from the SVN server in the new module mode
Checkout comes out as a dependent module, needs to be checkout from the SVN server, and then uses the new module mode to add the local dependencies to the dependent module,
This process is essentially the local copy into the main project, so can not be updated in real time, each time the SVN dependency on the project update, always need to re-checkout from the SVN server as a dependent module introduced, thereby increasing the workload.
Recently summed up a solution with some of the methods on the network:
- Check out the main project file using the SVN checkout master project URL
- Use the SVN checkout dependency engineering URL to check out dependent engineering files in the main project's home directory
- Create a new Build.gradle file in the home directory that relies on the project file so that dependent eclipse projects can be identified
Builder.gradle content is
Apply plugin:' Com.android.library 'Android {Compilesdkversion ABuildtoolsversion"23.0.1"Sourcesets {main {manifest.srcfile' Androidmanifest.xml 'Java.srcdirs = [' src '] Resources.srcdirs = [' src '] Aidl.srcdirs = [' src '] Renderscript.srcdirs = [' src '] Res.srcdirs = [' Res '] Assets.srcdirs = [' Assets ']}} defaultconfig {} buildtypes {release {minifyenabledfalseProguardfiles Getdefaultproguardfile (' Proguard-android.txt '),' Proguard-rules.txt '}}}dependencies {//Join the JAR package in the Libs directory hereCompileFiles(' libs/******* ')}
- Create a new Settings.gradle file in the main project directory
Settings.gradle content is:
include ‘:*******‘ //TODO *******为依赖Module名
Open the main project module settings join the dependent module
problem: the resource in SVN updated the jar package in Libs, need to modify compile files (' libs/*') in Build.gradle, need to update manually, to avoid compiling error, can not find the class used in the jar
Resources
Troubleshoot the introduction of an Eclipse dependency project from Android Studio to SVN that cannot be updated in real time