将 Android Studio 3.3 更新到 3.4 后出现错误。 它收到一个 AAPT2 错误,它向我提供了一个建议我喜欢这样的错误:
此构建中使用了已弃用的 Gradle 功能,使其与 Gradle 6.0 不兼容。 使用“--warning-mode all”来显示各个弃用警告。 见
gradle.properties
org.gradle.warning.mode=all
但还是不行。
错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeIntroMakerDebugResources'.
> 8 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #7: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 23s
这是 Build.gradle 文件:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
plugins {
id "com.onesignal.androidsdk.onesignal-gradle-plugin" version "0.12.1"
}
apply plugin: 'com.android.application'
//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
signingConfigs {
config {
keyAlias 'maker_key'
keyPassword '!23342'
storeFile
file('E:/axita.savani/Android_Project/AppCred/maker_key.jks')
storePassword '!23342'
}
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 17
targetSdkVersion 28
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a"
}
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-
optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
shrinkResources false
externalNativeBuild { ndkBuild { cFlags '-DDEBUG' } }
}
release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-
optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
shrinkResources true
externalNativeBuild { ndkBuild { cFlags '-DRELEASE' } }
}
}
sourceSets {
main {
res.srcDirs =
[
'src/main/res/layouts/activities',
'src/main/res/layouts/fragments',
'src/main/res/layouts/background',
'src/main/res/layouts/camera',
'src/main/res/layouts/sticker',
'src/main/res/layouts/text',
'src/main/res/layouts/editor',
'src/main/res/layouts/commom',
'src/main/res/layouts/other',
'src/main/res/layouts/videotrimmer',
'src/main/res/layouts/obgallarylib',
'src/main/res/layouts/template',
'src/main/res/layouts/eraser',
'src/main/res/layouts/user_guide',
'src/main/res/layouts/my_art',
'src/main/res/layouts/audio',
'src/main/res/layouts/video',
'src/main/res/layouts-land/activities',
'src/main/res/layouts-land/fragments',
'src/main/res/layouts-land/background',
'src/main/res/layouts-land/camera',
'src/main/res/layouts-land/sticker',
'src/main/res/layouts-land/text',
'src/main/res/layouts-land/editor',
'src/main/res/layouts-land/commom',
'src/main/res/layouts-land/other',
'src/main/res/layouts-land/my_art',
'src/main/res/layouts',
'src/main/res/layouts-land',
'src/main/res'
]
}
}
android {
aaptOptions {
ignoreAssetsPattern "!*ffprobe"
}
dexOptions {
jumboMode true
}
lintOptions {
disable 'GoogleAppIndexingWarning'
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in
release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
def flavorName = 'Maker'
// todo change in flavorname which app is used
externalNativeBuild {
ndkBuild {
path "src/${flavorName}/jni/Android.mk"
}
}
flavorDimensions "default"
product flavors {
// ONE SIGNAL IDs
Maker {
applicationId "com.example.maker"
versionCode 9
versionName "9.0"
flavorDimensions "default"
signingConfig signingConfigs.config
setProperty("archivesBaseName",
"Business_$versionName.$versionCode")
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
/*TODO one Signal*/
implementation 'com.onesignal:OneSignal:3.10.6'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
//implementation 'com.android.support:palette-v7:27.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
// implementation 'com.github.yalantis:ucrop:2.2.1'
implementation 'com.github.yalantis:ucrop:2.2.2'
// implementation 'com.kbeanie:multipicker:1.1.31@aar'
// implementation project(path: ':multipicker')
/*database Dislay From chorome used this */
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
/* Pinch zoom image */
//implementation 'com.davemorrissey.labs:subsampling-scale-image-
view:3.6.0'
implementation 'com.viewpagerindicator:library:2.4.1@aar'
/*GIF Image View*/
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
/* YOYO animation*/
implementation 'com.daimajia.easing:library:2.0@aar'
implementation 'com.daimajia.androidanimations:library:2.3@aar'
implementation 'com.codemybrainsout.rating:ratingdialog:1.0.8'
/* FCM */
// implementation 'com.google.firebase:firebase-messaging:15.0.2'
/* AdMob */
implementation 'com.google.firebase:firebase-ads:17.2.0'
/* InAppPurchase */
implementation 'com.android.billingclient:billing:1.2'
/* EU User Consent SDK */
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
//For Crash analytics
implementation('com.crashlytics.sdk.android:crashlytics:2.9.7@aar') {
transitive = true
}
implementation 'com.azeesoft.lib.colorpicker:colorpicker:1.0.9@aar'
implementation
'com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:0.7.2'
implementation 'nl.bravobit:android-ffmpeg:1.1.5'
implementation 'com.googlecode.mp4parser:isoparser:1.1.22'
/*storage for path */
implementation 'com.snatik:storage:2.1.0'
/*exo player for Audio and Video */
implementation 'com.devbrackets.android:exomedia:4.3.0'
/*Download file From Server */
implementation 'com.mindorks.android:prdownloader:0.5.0'
/*Ob Volly library*/
implementation 'com.optimumbrew.corelib:networking-volly:8.0.8'
/*Audio picker library */
implementation 'com.optimumbrew.picker:audiopicker:1.1.17'
/* Optimumbrew Image loader*/
implementation 'com.optimumbrew.obglide:obglide:2.0.2'
/* inhouse ads library*/
implementation 'com.optimumbrew.obinhouseads:obinhouseads:11.0.11'
implementation project(path: ':spacelib')
/*Video Tools*/
implementation project(':video-record')
implementation project(':video-compressor')
implementation project(':video-effect')
implementation 'com.daasuu:ExoPlayerFilter:0.2.3'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//exo player note : Don't upgrade of exoplayer vesion
implementation 'com.google.android.exoplayer:exoplayer:2.9.1'
implementation 'com.android.volley:volley:1.1.1'
}
//apply plugin: 'com.google.gms.google-services' // Use for FCM Push
最佳答案
在 Android Studio 终端中使用 ./gradlew build --warning-mode all 获取更多信息。
首先要做的总是使缓存无效 + 重新启动。
关于android - 将 Android Studio 3.3 更新为 3.4 后生成 AAPT2 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55772546/
给定这段代码defcreate@upgrades=User.update_all(["role=?","upgraded"],:id=>params[:upgrade])redirect_toadmin_upgrades_path,:notice=>"Successfullyupgradeduser."end我如何在该操作中实际验证它们是否已保存或未重定向到适当的页面和消息? 最佳答案 在Rails3中,update_all不返回任何有意义的信息,除了已更新的记录数(这可能取决于您的DBMS是否返回该信息)。http://ar.ru
大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje
我将应用程序升级到Rails4,一切正常。我可以登录并转到我的编辑页面。也更新了观点。使用标准View时,用户会更新。但是当我添加例如字段:name时,它不会在表单中更新。使用devise3.1.1和gem'protected_attributes'我需要在设备或数据库上运行某种更新命令吗?我也搜索过这个地方,找到了许多不同的解决方案,但没有一个会更新我的用户字段。我没有添加任何自定义字段。 最佳答案 如果您想允许额外的参数,您可以在ApplicationController中使用beforefilter,因为Rails4将参数
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c
我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file
我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe
在Cooper的书BeginningRuby中,第166页有一个我无法重现的示例。classSongincludeComparableattr_accessor:lengthdef(other)@lengthother.lengthenddefinitialize(song_name,length)@song_name=song_name@length=lengthendenda=Song.new('Rockaroundtheclock',143)b=Song.new('BohemianRhapsody',544)c=Song.new('MinuteWaltz',60)a.betwee
我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie
我有两个Rails模型,即Invoice和Invoice_details。一个Invoice_details属于Invoice,一个Invoice有多个Invoice_details。我无法使用accepts_nested_attributes_forinInvoice通过Invoice模型保存Invoice_details。我收到以下错误:(0.2ms)BEGIN(0.2ms)ROLLBACKCompleted422UnprocessableEntityin25ms(ActiveRecord:4.0ms)ActiveRecord::RecordInvalid(Validationfa