WebStorm:无法为类找到生成的setter

时间:2018-05-16 19:13:57

标签: android gradle android-gradle webstorm

在我在webstorm中创建的react本机项目中,我可以调试运行iOS模拟器的应用程序。但是,当我从插入我的机器的Android设备运行应用程序时,第一个屏幕出现,我可以浏览外部屏幕。但是,对于按钮等,没有任何事件像onChangeonClick那样触发,并且没有任何断点被击中。

我在后台运行android studio,我可以在Logcat窗口中看到消息。我在logcat窗口中看到以下错误消息:

05-18 11:38:59.840 5334-5403/? D/libGLESv1: STS_GLApi : DTS is not allowed for Package : com.myapp
05-18 11:38:59.843 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupViewManager
05-18 11:38:59.844 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
05-18 11:38:59.853 5334-5334/? D/InputTransport: Input channel constructed: fd=72
05-18 11:38:59.853 5334-5334/? D/ViewRootImpl@ae2323d[PopupWindow:84819a6]: setView = android.widget.PopupWindow$PopupDecorView{fb26bf5 V.E...... ......I. 0,0-0,0} touchMode=true
05-18 11:38:59.854 5334-5334/? D/ViewRootImpl@a253e0b[MainActivity]: MSG_RESIZED_REPORT: ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
05-18 11:38:59.854 5334-5334/? V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@5acd8a nm : com.myapp ic=null
05-18 11:38:59.854 5334-5334/? I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
05-18 11:38:59.860 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeViewManager
05-18 11:38:59.862 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextViewManager
05-18 11:38:59.869 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
05-18 11:38:59.871 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.checkbox.ReactCheckBoxManager
05-18 11:38:59.872 5334-5346/? D/InputTransport: Input channel constructed: fd=73
05-18 11:38:59.877 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
05-18 11:38:59.893 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
05-18 11:38:59.905 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
05-18 11:38:59.914 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
05-18 11:38:59.916 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
05-18 11:38:59.933 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollContainerViewManager
05-18 11:38:59.942 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
05-18 11:38:59.948 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
05-18 11:38:59.953 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
05-18 11:38:59.958 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager
05-18 11:38:59.965 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode
05-18 11:38:59.966 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
05-18 11:38:59.970 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
05-18 11:38:59.971 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager
05-18 11:38:59.976 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
05-18 11:38:59.981 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager
05-18 11:38:59.985 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager
05-18 11:38:59.986 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShadowNode
05-18 11:38:59.988 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager
05-18 11:38:59.990 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
05-18 11:39:00.000 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
05-18 11:39:00.004 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ModalHostShadowNode
05-18 11:39:00.005 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
05-18 11:39:00.006 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextShadowNode
05-18 11:39:00.007 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
05-18 11:39:00.018 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
05-18 11:39:00.018 5334-5334/? D/ViewRootImpl@ae2323d[PopupWindow:84819a6]: dispatchDetachedFromWindow
05-18 11:39:00.023 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
05-18 11:39:00.027 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
05-18 11:39:00.028 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
05-18 11:39:00.038 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
05-18 11:39:00.041 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
05-18 11:39:00.043 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.RenderableViewManager
05-18 11:39:00.051 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.GroupShadowNode
05-18 11:39:00.061 5334-5334/? D/InputTransport: Input channel destroyed: fd=72
05-18 11:39:00.062 5334-5334/? V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@802dc66 nm : com.myapp ic=null
05-18 11:39:00.067 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.PathShadowNode
05-18 11:39:00.068 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.CircleShadowNode
05-18 11:39:00.069 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.EllipseShadowNode
05-18 11:39:00.071 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.LineShadowNode
05-18 11:39:00.072 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.RectShadowNode
05-18 11:39:00.074 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.TextShadowNode
05-18 11:39:00.078 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.TSpanShadowNode
05-18 11:39:00.081 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.TextPathShadowNode
05-18 11:39:00.084 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.ImageShadowNode
05-18 11:39:00.087 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.ClipPathShadowNode
05-18 11:39:00.088 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.DefsShadowNode
05-18 11:39:00.090 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.UseShadowNode
05-18 11:39:00.092 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.SymbolShadowNode
05-18 11:39:00.094 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.LinearGradientShadowNode
05-18 11:39:00.096 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.RadialGradientShadowNode
05-18 11:39:00.099 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.SvgViewManager
05-18 11:39:00.100 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.SvgViewShadowNode
05-18 11:39:00.104 5334-5405/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.brentvatne.react.ReactVideoViewManager
05-18 11:39:00.121 5334-5405/? D/ReactNative: Initializing React Xplat Bridge.
05-18 11:39:00.125 5334-5405/? D/ReactNative: Initializing React Xplat Bridge before initializeBridge
05-18 11:39:00.133 5334-5405/? D/ReactNative: Initializing React Xplat Bridge after initializeBridge
05-18 11:39:00.141 5334-5426/? D/ReactNative: ReactInstanceManager.setupReactContext()


build.gradle in app folder:

    def enableProguardInReleaseBuilds = false

    android {
        compileSdkVersion 23
        buildToolsVersion '26.0.1'

        defaultConfig {
            applicationId “com.myapp”
            minSdkVersion 16
            targetSdkVersion 22
            versionCode 1
            versionName "1.0"
            ndk {
                abiFilters "armeabi-v7a", "x86"
            }
            renderscriptTargetApi 21
            renderscriptSupportModeEnabled true
        }
        splits {
            abi {
                reset()
                enable enableSeparateBuildPerCPUArchitecture
                universalApk false  // If true, also generate a universal APK
                include "armeabi-v7a", "x86"
            }
        }
        buildTypes {
            release {
                minifyEnabled enableProguardInReleaseBuilds
                proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            }
        }
        // applicationVariants are e.g. debug, release
        applicationVariants.all { variant ->
            variant.outputs.each { output ->
                // For each separate APK per architecture, set a unique version code as described here:
                // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
                def versionCodes = ["armeabi-v7a":1, "x86":2]
                def abi = output.getFilter(OutputFile.ABI)
                if (abi != null) {  // null for the universal-debug, universal-release variants
                    output.versionCodeOverride =
                            versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
                }
            }
        }
    }

    dependencies {
        compile project(':react-native-svg')
        compile project(':react-native-video')
        compile project(':react-native-vector-icons')
        compile fileTree(dir: "libs", include: ["*.jar"])
        compile "com.android.support:appcompat-v7:23.0.1"
        compile "com.facebook.react:react-native:+"  // From node_modules
    }

    // Run this once to be able to run the application with BUCK
    // puts all compile dependencies into folder libs for BUCK to use
    task copyDownloadableDepsToLibs(type: Copy) {
        from configurations.compile
        into 'libs'
    }

android文件夹中的build.gradle:

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

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

最初,当我在调试器中运行应用程序时,我收到一个错误,似乎表明我需要将gradle升级到3.1.2。考虑到这是一个反应原生的webstorm项目,我需要执行哪些步骤进行gradle升级。其次,我需要做些什么来修复“找不到生成的setter”错误消息?这些错误消息可能与屏幕无法正常工作的原因有关吗?

0 个答案:

没有答案