在更新到Android Studio 3.0并创建一个新项目后,我注意到build.gradle有一种新方法可以添加新的依赖项,而不是compile存在implementation而不是testCompile存在testImplementation.
例:
implementation 'com.android.support:appcompat-v7:25.0.0'
testImplementation 'junit:junit:4.12'
Run Code Online (Sandbox Code Playgroud)
代替
compile 'com.android.support:appcompat-v7:25.0.0'
testCompile 'junit:junit:4.12'
Run Code Online (Sandbox Code Playgroud)
它们之间有什么区别,我应该使用什么?
dependency-management gradle transitive-dependency build.gradle gradle-plugin
更新到android studio 2.3后,我收到此错误消息.我知道这只是一个暗示,因为应用程序正常运行,但它真的很奇怪.
所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃).找到的版本25.1.1,24.0.0.示例包括com.android.support:animated-vector-drawable:25.1.1和com.android.support:mediarouter-v7:24.0.0
我的朋友:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.blankj:utilcode:1.3.6'
compile 'com.orhanobut:logger:1.15'
compile 'com.facebook.stetho:stetho:1.4.2'
provided 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.ryanharter.auto.value:auto-value-parcel:0.2.5'
compile 'com.mikepenz:iconics-core:2.8.2@aar'
compile('com.mikepenz:materialdrawer:5.8.1@aar') { transitive = true }
compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'
compile 'com.github.GrenderG:Toasty:1.1.1'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.8.0'
compile 'com.github.MAXDeliveryNG:slideview:1.0.0'
compile 'com.facebook.fresco:fresco:1.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.maps.android:android-maps-utils:0.4.4' …Run Code Online (Sandbox Code Playgroud) 当我尝试通过添加获得android studio 2.1和android N SDK后更新我的android项目以使用Java 8
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Run Code Online (Sandbox Code Playgroud)
我有这个错误
错误:Jack需要支持java 8语言功能.启用Jack或删除sourceCompatibility JavaVersion.VERSION_1_8.
我该怎么办?
更新到Android Studio 3.1后,我收到以下错误消息:
该项目工作正常,这主要是一个警告,所以我的问题是警告的含义是什么,我怎么能摆脱它?
gradle文件中的相关部分:
这是我的项目 build.gradle
buildscript {
ext {
kotlin_version = '1.2.31'
anko_version = '0.10.4'
room_version = '1.0.0'
support_version = '27.1.0'
firebase_version = '12.0.0'
gms_version = '12.0.0'
}
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的应用程序build.gradle文件:
apply plugin: 'com.android.application'
apply plugin: …Run Code Online (Sandbox Code Playgroud) 我做了一个pull请求,但之后我在本地对项目进行了一些提交,最终污染了我的pull请求,我试图删除它,但没有任何运气.
我在StackOverflow上发现了一些类似的问题,但我无法应用那里的内容.这是我在GitHub上的第一个拉取请求,所以对我来说这一切都很有用.
突出显示的提交是我需要保留并删除所有其他内容的提交.它成为历史上的第四个提交,因为我做了一些合并的东西.
有人可以解释一下发生了什么以及如何解决这个问题?
我正在尝试在我的 M1 中构建一个项目,
但当我运行时出现此错误npx react-native run-android
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.work:work-runtime:2.7.0-beta01.
AAR metadata file: /Users/macpro/.gradle/caches/transforms-3/999e9d813832e06d8f1b7de52647a502/transformed/work-runtime-2.7.0-beta01/META-INF/com/android/build/gradle/aar-metadata.properties.
Run Code Online (Sandbox Code Playgroud)
Android/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "30.0.0"
minSdkVersion = 21
compileSdkVersion = …Run Code Online (Sandbox Code Playgroud) 我正在尝试向IntelliJ IDEA 添加一个c/c ++插件,所以我去了插件并搜索它但找不到它.他们删除了它并用新的IDE cLion替换它吗?是不再支持或什么?
我正在尝试记录一个方法并尝试使用@link和@code在JavaDoc中一样.
我知道在kotlin有一个kDoc,但我找不到它们或至少有类似的东西.
升级到Android Studio 2.4 Preview 4后,出现此错误
错误:无法初始化类com.android.ide.common.util.ReadWriteProcessLock
自Android 5.0以来,Google添加了Google API.究竟是什么?
Google API intel atom_64 x86系统映像和Google API intel atom x86系统映像有什么区别?
我知道英特尔原子图像要快得多,但它们有很多.
我应该使用什么版本作为我的主要模拟器?