如何导入从github下载的项目,该项目基于较旧的gradle版本(2.0.0)? 这是我的build.gradle -
"chromedriver": "^2.21.2",
"selenium-server": "^2.53.0"
每当我将gradle版本更改为2.1.2(这是我所有项目使用的gradle版本)时,项目就会停留在“building ..”消息上并且永远不会导入 -
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
}
}
ext {
compileSdkVersion = 23
buildToolsVersion = "23.0.3"
minSdkVersion = 14
targetSdkVersion = 23
}
我甚至尝试用我的项目中的那个替换整个build.gradle文件,但仍然没有运气。
答案 0 :(得分:1)
这是我从Github导入项目后所做的事情
有两个gradle文件如图所示
在第一个gradle文件中用你的替换类路径
%load and save only txt files
%just the files in struct
ls_al = dir;
justfiles = ls_al(~[ls_al.isdir]); %only for files
%save only folders by removing . and ..
%folders in cell
d = dir(pwd);
isub = [d(:).isdir]; %# returns logical vector
nameFolds = {d(isub).name}';
nameFolds(ismember(nameFolds,{'.','..'})) = [];
% move file to folder
for i=1:numel(justfiles)
filename=fullfile(justfiles.name(i));
foldername=fullfile(nameFolds(i));
movefile(filename,foldername);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
用你的
替换以下这些行classpath 'com.android.tools.build:gradle:2.1.2'
和强>
compileSdkVersion 23
buildToolsVersion "23.0.2"
如果存在依赖于库的依赖性,那么
也是如此答案 1 :(得分:0)