我已经改变了被命名一些文件去首字母大写,如Name.jpg到name.jpg.Git无法识别此更改,我不得不删除文件并再次上传.在检查文件名的变化时,Git是否有区分大小写的方法?我没有对文件本身进行任何更改.
我在使用Android Studio(0.1.5)编译我的应用时遇到问题.该应用程序使用2个库,我包括如下:
settings.gradle
include ':myapp',':library',':android-ColorPickerPreference'
Run Code Online (Sandbox Code Playgroud)
的build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar')
compile project(':library')
compile project(':android-ColorPickerPreference')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
Run Code Online (Sandbox Code Playgroud)
编译时我收到此消息:
Gradle: A problem occurred configuring project ':myapp'.
> Failed to notify project evaluation listener.
> Configuration with name 'default' not found.
Run Code Online (Sandbox Code Playgroud)
你能帮我这个消息吗?谢谢!
我正在使用凌空库在android中执行网络操作.所以我试图在我的项目中添加这个库,该项目是在Android Studio和gradle系统中创建的.
我在我的项目中添加了凌空库,但是当我与gradle同步时,我收到错误消息.我尝试了我在这里看到的所有答案,但没有任何对我有用.
错误消息:在Android Studio中找不到名称为"default"的配置
凌空/的build.gradle
apply plugin: 'android-library'
android {
compileSdkVersion 19
buildToolsVersion '19.0.1'
sourceSets {
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
}
main {
assets.srcDirs = ['assets']
res.srcDirs = ['res']
aidl.srcDirs = ['src']
resources.srcDirs = ['src']
renderscript.srcDirs = ['src']
java.srcDirs = ['src']
manifest.srcFile 'AndroidManifest.xml'
}
}
}
Run Code Online (Sandbox Code Playgroud)
应用程序/的build.gradle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.1'
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' …Run Code Online (Sandbox Code Playgroud) I am running into a problem with trying to include a Git submodule in my Gradle project and depend on a single Gradle module within the Git submodule.
The submodule is a library that has the following structure:
MappingLib
-BaseLib
-AndroidLib
Run Code Online (Sandbox Code Playgroud)
Where the settings.gradle file for MappingLib contains:
include ':BaseLib', ':AndroidLib'
Run Code Online (Sandbox Code Playgroud)
and the AndroidLib's build.gradle file contains (among other things):
dependencies {
...
compile project(':BaseLib')
...
}
Run Code Online (Sandbox Code Playgroud)
当独立开发时,子模块构建得很好。
然后我有另一个项目,其中包含 MappingLib 作为子模块。该项目具有以下结构:
MyCoolApp
-app
-MappingLib (this is the submodule)
-BaseLib
-AndroidLib …Run Code Online (Sandbox Code Playgroud) 我已经添加了gradle文件。请查看它们,并帮助我解决问题。我从github复制此项目时,我遵循了每个步骤,因此在gradle同步中遇到问题。谢谢
// Top-level build file where you can add configuration options common to all sub-projects/modules.enter code here
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task copy_cardboard_images() {
doFirst {
exec {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
// windows
commandLine 'cmd', '/c', 'adb', 'pull', '/mnt/shell/emulated/0/DCIM/CardboardCamera'
} …Run Code Online (Sandbox Code Playgroud)