GVKun编程网logo

来自 nativeGetEnabledTags 的意外值:0(05ff来自bsi的意外的重新初始化故障)

8

在本文中,我们将详细介绍来自nativeGetEnabledTags的意外值:0的各个方面,并为您提供关于05ff来自bsi的意外的重新初始化故障的相关解答,同时,我们也将为您带来关于@EnableT

在本文中,我们将详细介绍来自 nativeGetEnabledTags 的意外值:0的各个方面,并为您提供关于05ff来自bsi的意外的重新初始化故障的相关解答,同时,我们也将为您带来关于@EnableTransactionalManager 发生了什么、android – API’variable.getExternalNativeBuildTasks()’已过时,已替换为’variant.getExternalNativeBuildProvid、API 'variant.getExternalNativeBuildTasks()' 已过时并已替换为 'variant.getExternalNativeBuildProviders()、asp.net-mvc-4 – MVC 4中的ClientValidationEnabled和UnobtrusiveJavaScriptEnabled的有用知识。

本文目录一览:

来自 nativeGetEnabledTags 的意外值:0(05ff来自bsi的意外的重新初始化故障)

来自 nativeGetEnabledTags 的意外值:0(05ff来自bsi的意外的重新初始化故障)

我安装了最新版本的 SDK (r21) 和 ADT
21.0.0。我尝试了简单的代码,它运行良好,但现在我在LogCat中收到以前版本中没有出现的警告:

来自 nativeGetEnabledTags 的意外值:0

我用谷歌搜索,发现 问题 39723: Emulator spams LogCat with “Unexpected value from
nativeGetEnabledTags: 0”
message

这是什么意思?

答案1

小编典典

我也遇到了这个问题。作为一种解决方法,我在过滤器字段LogCat上使用以下表达式过滤输出:by Log Message

^(?!.*(nativeGetEnabledTags)).*$

否则它是如此垃圾邮件它几乎是无用的。

建议,如果您想始终过滤它而不必总是将其写在Searchfor messages字段上:

  1. 转到您的Logcat
  2. Saved Filters左侧部分中,单击Edit selected logcat filter(如果未显示已保存的过滤器,则单击 Logcat 中的显示已保存的过滤器视图)
  3. 在那里,在按日志消息字段中,输入^(?!.*(nativeGetEnabledTags)).*$

@EnableTransactionalManager 发生了什么

@EnableTransactionalManager 发生了什么

@EnableTransactionalManager

  1. 利用TransactionManagementConfigurationSelector 给容器中注入bean,导入2个组件:

    • AutoProxyRegistrar
    • ProxyTransactionManagementConfiguration
  2. AutoProxyRegistrar
    InfrastructureAdvisorAutoProxyCreator 给容器中注册一个这个组件

    类uml图中可以看出,这个组件和aop中的实现很类似

    file

    该组件利用后置处理器在对象创建之后,返回一个代理对象,代理对象执行方法利用拦截器链进行调用

  3. ProxyTransactionManagementConfiguration

    1. 给容器中添加事务增强器

      * 事务增强器要用到事务的注解信息,用AnnotationTransactionAttributeSource,解析事务的注解参数
      
      * 事务拦截器 TransactionInterceptor ,保存了事务属性,事务管理器,是一个 `MethodInterceptor` ,在目标方法执行的时候执行拦截器链。
      
           ```java
           TransactionAttribute txAttr = tas != null ? tas.getTransactionAttribute(method, targetClass) : null;
           PlatformTransactionManager tm = this.determineTransactionManager(txAttr);
           ```
      
           1. 先获取事务的属性
      
           2. 获取`PlatformTransactionManager`,如果事先没有添加,则从ioc中获取PlatformTransactionManager,
      
           3. 执行目标方法,如果异常,获取到事务管理器,利用事务管理器回滚这次操作。如果正常,利用事务管理器,提交事务。
https://github.com/fulln

android – API’variable.getExternalNativeBuildTasks()’已过时,已替换为’variant.getExternalNativeBuildProvid

android – API’variable.getExternalNativeBuildTasks()’已过时,已替换为’variant.getExternalNativeBuildProvid

使用Android Studio 3.3 Canary 11和gradle插件版本3.3.0-alpha11.尝试同步gradle时,它会引发以下错误

WARNING: API 'variant.getExternalNativeBuildTasks()' is obsolete and has been 
replaced with 'variant.getExternalNativebuildproviders()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration- 
avoidance
Affected Modules: app

单击错误会将我引导至gradle文件中的此行

applicationVariants.all { variant ->
            variant.outputs.all {
                outputFileName = "${variant.name}-${variant.versionName}.apk"
            }
        }

我到底需要改变什么?

project build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        mavenCentral() // jcenter() works as well because it pulls from Maven Central
        maven { url "https://maven.google.com" }
        google()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha11'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath "io.realm:realm-gradle-plugin:4.1.1"
        classpath 'com.google.gms:google-services:3.2.1'
        classpath 'com.google.firebase:firebase-plugins:1.1.5'
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://maven.google.com" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

// Define versions in a single place
ext {
    // Sdk and tools
    minSdkVersion = 21
    targetSdkVersion = 27
    compileSdkVersion = 27
    buildToolsversion = '27.0.3'

    // App dependencies
    supportLibraryVersion = '27.1.1'
    appCompactLibraryVersion = '27.1.1'
    playServicesversion = '15.0.1'
    firebaseVersionCore = '16.0.1'
    firebaseVersionPerf = '16.0.0'
    firebaseVersionMessaging = '17.1.0'

    //lottie
    lottieVersion = '2.5.0'
}

app build.gradle

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.25.4'
    }
    buildscript {
        repositories {
            maven { url "https://maven.google.com" }
            maven { url 'https://maven.fabric.io/public' }
            mavenCentral()

        }

        dependencies {
            // These docs use an open ended version so that our plugin
            // can be updated quickly in response to Android tooling updates

            // We recommend changing it to the latest version from our changelog:
            // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
            classpath 'io.fabric.tools:gradle:'
        }
    }
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'io.fabric'
apply plugin: 'realm-android'

android {

    realm {
        syncEnabled = false
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        applicationId "example.com"
        minSdkVersion rootProject.ext.minSdkVersion
        multiDexEnabled true
        versionCode mVersionCode
        versionName mVersionName
        vectorDrawables.useSupportLibrary = true

    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildTypes {

        applicationVariants.all { variant ->
            variant.outputs.all {
                outputFileName = "${variant.name}-${variant.versionName}.apk"
            }
        }

        release {
            shrinkResources true
            minifyEnabled true
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

            lintOptions {
                disable 'MissingTranslation'
            }

            applicationVariants.all { variant ->
                variant.outputs.all {
                    outputFileName = "${variant.name}-${variant.versionName}.apk"
                }
            }

        }
        debug {
            shrinkResources true
            minifyEnabled true
            useProguard true
            debuggable true
            versionNameSuffix '-DEBUG'
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'debug-proguard-rules.pro'

            ext.enableCrashlytics = false
            crunchPngs false

        }
    }

    flavorDimensions "default"

    lintOptions {

        checkReleaseBuilds false

    }

    packagingOptions {
        exclude 'meta-inf/DEPENDENCIES.txt'
        exclude 'meta-inf/LICENSE.txt'
        exclude 'meta-inf/NOTICE.txt'
        exclude 'meta-inf/NOTICE'
        exclude 'meta-inf/LICENSE'
        exclude 'meta-inf/DEPENDENCIES'
        exclude 'meta-inf/notice.txt'
        exclude 'meta-inf/license.txt'
        exclude 'meta-inf/dependencies.txt'
        exclude 'meta-inf/LGPL2.1'
    }
    buildToolsversion '28.0.2'
}

configurations {
    implementation.exclude group: "org.apache.httpcomponents", module: "httpclient"
}

dependencies {
    implementation filetree(include: ['*.jar'], dir: 'libs')

    implementation "com.android.support:appcompat-v7:$rootProject.appCompactLibraryVersion"
    implementation "com.android.support:support-compat:$rootProject.supportLibraryVersion"
    implementation "com.android.support:mediarouter-v7:$rootProject.supportLibraryVersion"
    implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
    implementation "com.android.support:design:$rootProject.supportLibraryVersion"


    api 'com.squareup.retrofit2:retrofit:2.4.0'
    api 'com.squareup.okhttp3:okhttp:3.11.0'
    api 'com.squareup.okhttp3:logging-interceptor:3.10.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.daimajia.easing:library:2.0@aar'
    implementation 'com.daimajia.androidanimations:library:2.3@aar'

    implementation 'com.akexorcist:googledirectionlibrary:1.0.5'
    implementation 'io.reactivex:rxandroid:1.2.1'
    implementation 'io.reactivex:rxjava:1.3.0'
    // Wifi hotspot library
    implementation 'cc.mvdan.accesspoint:library:0.2.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'org.jsoup:jsoup:1.10.3'
    api "com.airbnb.android:lottie:$rootProject.lottieVersion"
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    testImplementation 'junit:junit:4.12'
    implementation 'com.jakewharton:butterknife:8.8.1'

    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'

    implementation 'com.googlecode.libphonenumber:libphonenumber:8.2.0'

    implementation "com.google.android.gms:play-services-base:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-cast-framework:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-auth:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-identity:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-awareness:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-cast:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-drive:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-location:$rootProject.playServicesversion"
    implementation "com.google.android.gms:play-services-maps:$rootProject.playServicesversion"

    implementation "com.google.firebase:firebase-core:$rootProject.firebaseVersionCore"
    implementation "com.google.firebase:firebase-perf:$rootProject.firebaseVersionPerf"
    implementation "com.google.firebase:firebase-messaging:$rootProject.firebaseVersionMessaging"
    implementation "com.google.firebase:firebase-analytics:$rootProject.firebaseVersionCore"


    api('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
        transitive = true
    }
    api('com.crashlytics.sdk.android:answers:1.4.1@aar') {
        transitive = true
    }
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    api project(path: ':libraryBTHelper')
    api project(':bkk_rush')

    debugApi 'com.amitshekhar.android:debug-db:1.0.3'
    api "org.jdeferred:jdeferred-android-aar:1.2.6"
    implementation 'com.android.support:gridlayout-v7:27.1.1'
}

apply plugin: 'com.google.gms.google-services'

我在app / build.gradle文件中跳过了一些常量和其他敏感信息.

解决方法:

该问题已在最新版本“io.fabric.tools:gradle:1.30.0”中修复

请使用1.30.0更新您的两个gradle结构工具

buildscript {
  // ... repositories, etc. ...

   dependencies {
       // ...other dependencies ...
       classpath 'io.fabric.tools:gradle:1.30.0'
   }
}

有关详细信息https://github.com/firebase/firebase-android-sdk/issues/198#issuecomment-473435453

API 'variant.getExternalNativeBuildTasks()' 已过时并已替换为 'variant.getExternalNativeBuildProviders()

API 'variant.getExternalNativeBuildTasks()' 已过时并已替换为 'variant.getExternalNativeBuildProviders()

使用带有 gradle 插件版本的 Android Studio 3.3 Canary 11 3.3.0-alpha11。尝试同步 gradle
时会引发以下错误

WARNING: API ''variant.getExternalNativeBuildTasks()'' is obsolete and has been replaced with ''variant.getExternalNativeBuildProviders()''.It will be removed at the end of 2019.For more information, see https://d.android.com/r/tools/task-configuration- avoidanceAffected Modules: app

单击错误会导致我进入 gradle 文件中的这一行

applicationVariants.all { variant ->            variant.outputs.all {                outputFileName = "${variant.name}-${variant.versionName}.apk"            }        }

我到底需要在这里改变什么?

项目build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    repositories {        jcenter()        mavenCentral() // jcenter() works as well because it pulls from Maven Central        maven { url "https://maven.google.com" }        google()    }    dependencies {        classpath ''com.android.tools.build:gradle:3.3.0-alpha11''        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files        classpath "io.realm:realm-gradle-plugin:4.1.1"        classpath ''com.google.gms:google-services:3.2.1''        classpath ''com.google.firebase:firebase-plugins:1.1.5''    }}allprojects {    repositories {        jcenter()        maven { url "https://maven.google.com" }    }}task clean(type: Delete) {    delete rootProject.buildDir}// Define versions in a single placeext {    // Sdk and tools    minSdkVersion = 21    targetSdkVersion = 27    compileSdkVersion = 27    buildToolsVersion = ''27.0.3''    // App dependencies    supportLibraryVersion = ''27.1.1''    appCompactLibraryVersion = ''27.1.1''    playServicesVersion = ''15.0.1''    firebaseVersionCore = ''16.0.1''    firebaseVersionPerf = ''16.0.0''    firebaseVersionMessaging = ''17.1.0''    //lottie    lottieVersion = ''2.5.0''}

应用程序构建.gradle

buildscript {    repositories {        maven { url ''https://maven.fabric.io/public'' }    }    dependencies {        classpath ''io.fabric.tools:gradle:1.25.4''    }    buildscript {        repositories {            maven { url "https://maven.google.com" }            maven { url ''https://maven.fabric.io/public'' }            mavenCentral()        }        dependencies {            // These docs use an open ended version so that our plugin            // can be updated quickly in response to Android tooling updates            // We recommend changing it to the latest version from our changelog:            // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin            classpath ''io.fabric.tools:gradle:''        }    }}apply plugin: ''com.android.application''apply plugin: ''com.google.firebase.firebase-perf''repositories {    maven { url ''https://maven.fabric.io/public'' }}apply plugin: ''io.fabric''apply plugin: ''realm-android''android {    realm {        syncEnabled = false    }    dexOptions {        javaMaxHeapSize "4g"    }    compileSdkVersion rootProject.ext.compileSdkVersion    defaultConfig {        applicationId "example.com"        minSdkVersion rootProject.ext.minSdkVersion        multiDexEnabled true        versionCode mVersionCode        versionName mVersionName        vectorDrawables.useSupportLibrary = true    }    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_8        targetCompatibility JavaVersion.VERSION_1_8    }    buildTypes {        applicationVariants.all { variant ->            variant.outputs.all {                outputFileName = "${variant.name}-${variant.versionName}.apk"            }        }        release {            shrinkResources true            minifyEnabled true            useProguard true            proguardFiles getDefaultProguardFile(''proguard-android.txt''), ''proguard-rules.pro''            lintOptions {                disable ''MissingTranslation''            }            applicationVariants.all { variant ->                variant.outputs.all {                    outputFileName = "${variant.name}-${variant.versionName}.apk"                }            }        }        debug {            shrinkResources true            minifyEnabled true            useProguard true            debuggable true            versionNameSuffix ''-DEBUG''            proguardFiles getDefaultProguardFile(''proguard-android.txt''), ''debug-proguard-rules.pro''            ext.enableCrashlytics = false            crunchPngs false        }    }    flavorDimensions "default"    lintOptions {        checkReleaseBuilds false    }    packagingOptions {        exclude ''META-INF/DEPENDENCIES.txt''        exclude ''META-INF/LICENSE.txt''        exclude ''META-INF/NOTICE.txt''        exclude ''META-INF/NOTICE''        exclude ''META-INF/LICENSE''        exclude ''META-INF/DEPENDENCIES''        exclude ''META-INF/notice.txt''        exclude ''META-INF/license.txt''        exclude ''META-INF/dependencies.txt''        exclude ''META-INF/LGPL2.1''    }    buildToolsVersion ''28.0.2''}configurations {    implementation.exclude group: "org.apache.httpcomponents", module: "httpclient"}dependencies {    implementation fileTree(include: [''*.jar''], dir: ''libs'')    implementation "com.android.support:appcompat-v7:$rootProject.appCompactLibraryVersion"    implementation "com.android.support:support-compat:$rootProject.supportLibraryVersion"    implementation "com.android.support:mediarouter-v7:$rootProject.supportLibraryVersion"    implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"    implementation "com.android.support:design:$rootProject.supportLibraryVersion"    api ''com.squareup.retrofit2:retrofit:2.4.0''    api ''com.squareup.okhttp3:okhttp:3.11.0''    api ''com.squareup.okhttp3:logging-interceptor:3.10.0''    implementation ''com.google.code.gson:gson:2.8.2''    implementation ''com.squareup.retrofit2:converter-gson:2.3.0''    implementation ''com.squareup.picasso:picasso:2.5.2''    implementation ''com.squareup.retrofit2:adapter-rxjava:2.3.0''    implementation ''com.android.support:multidex:1.0.3''    implementation ''com.daimajia.easing:library:2.0@aar''    implementation ''com.daimajia.androidanimations:library:2.3@aar''    implementation ''com.akexorcist:googledirectionlibrary:1.0.5''    implementation ''io.reactivex:rxandroid:1.2.1''    implementation ''io.reactivex:rxjava:1.3.0''    // Wifi hotspot library    implementation ''cc.mvdan.accesspoint:library:0.2.0''    implementation ''com.android.support.constraint:constraint-layout:1.1.3''    implementation ''org.jsoup:jsoup:1.10.3''    api "com.airbnb.android:lottie:$rootProject.lottieVersion"    implementation ''com.android.support:support-v4:27.1.1''    implementation ''com.android.support:recyclerview-v7:27.1.1''    testImplementation ''junit:junit:4.12''    implementation ''com.jakewharton:butterknife:8.8.1''    debugImplementation ''com.squareup.leakcanary:leakcanary-android:1.5.4''    releaseImplementation ''com.squareup.leakcanary:leakcanary-android-no-op:1.5.4''    implementation ''com.googlecode.libphonenumber:libphonenumber:8.2.0''    implementation "com.google.android.gms:play-services-base:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-cast-framework:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-auth:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-identity:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-awareness:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-cast:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-drive:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-location:$rootProject.playServicesVersion"    implementation "com.google.android.gms:play-services-maps:$rootProject.playServicesVersion"    implementation "com.google.firebase:firebase-core:$rootProject.firebaseVersionCore"    implementation "com.google.firebase:firebase-perf:$rootProject.firebaseVersionPerf"    implementation "com.google.firebase:firebase-messaging:$rootProject.firebaseVersionMessaging"    implementation "com.google.firebase:firebase-analytics:$rootProject.firebaseVersionCore"    api(''com.crashlytics.sdk.android:crashlytics:2.8.0@aar'') {        transitive = true    }    api(''com.crashlytics.sdk.android:answers:1.4.1@aar'') {        transitive = true    }    annotationProcessor ''com.jakewharton:butterknife-compiler:8.8.1''    api project(path: '':libraryBTHelper'')    api project('':bkk_rush'')    debugApi ''com.amitshekhar.android:debug-db:1.0.3''    api "org.jdeferred:jdeferred-android-aar:1.2.6"    implementation ''com.android.support:gridlayout-v7:27.1.1''}apply plugin: ''com.google.gms.google-services''

我在 app/build.gradle 文件中跳过了一些常量和其他敏感信息。

答案1

小编典典

该问题已在其最新版本中修复''io.fabric.tools:gradle:1.30.0''

请使用1.30.0* 更新您的两个 gradle fabric 工具 *

buildscript {  // ... repositories, etc. ...   dependencies {       // ...other dependencies ...       classpath ''io.fabric.tools:gradle:1.30.0''   }}

更多详情https://github.com/firebase/firebase-android-
sdk/issues/198#issuecomment-473435453

asp.net-mvc-4 – MVC 4中的ClientValidationEnabled和UnobtrusiveJavaScriptEnabled

asp.net-mvc-4 – MVC 4中的ClientValidationEnabled和UnobtrusiveJavaScriptEnabled

在MVC 4中,为了在视图中启用客户端验证,在web.config中是否应该将ClientValidationEnabled和Unobtrusive JavaScriptEnabled键都设置为true?

WEB.CONfig

<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />

解决方法

也可以通过控制器:
//Enable or disable Client Side Validation at Application Level
HtmlHelper.ClientValidationEnabled = true;
HtmlHelper.UnobtrusiveJavaScriptEnabled = true;

我们今天的关于来自 nativeGetEnabledTags 的意外值:005ff来自bsi的意外的重新初始化故障的分享已经告一段落,感谢您的关注,如果您想了解更多关于@EnableTransactionalManager 发生了什么、android – API’variable.getExternalNativeBuildTasks()’已过时,已替换为’variant.getExternalNativeBuildProvid、API 'variant.getExternalNativeBuildTasks()' 已过时并已替换为 'variant.getExternalNativeBuildProviders()、asp.net-mvc-4 – MVC 4中的ClientValidationEnabled和UnobtrusiveJavaScriptEnabled的相关信息,请在本站查询。

本文标签: