小编Man*_*kar的帖子

在TouchableOpacity上反应Native nextFocusRight Prop不起作用

我试图使用nextFocusRight停止从React Native中的最后一个元素传播焦点,但是焦点仍传播到下一个视图。根据此拉取请求,它应该可以工作,但仍然面临相同的问题

我的代码:App.js

export default class App extends Component {

  render() {
    const data = [];
    for (let i = 0; i < 10; i++)
      data.push(i);

    return (
      <View>
        <View>
          {[1, 2].map(() => (
            <ScrollView horizontal style={{ height: 210 }}>
              {data.map(i => <Item id={i} buttonRef={this.buttonRef} />)}
            </ScrollView>
          ))}

        </View>
      </View>
    );
  }
}
Run Code Online (Sandbox Code Playgroud)

Item.js

export default class Item extends Component {
    myRef = null;

    componentDidMount() {
        const { id } = this.props;
        if (id == 0) {
            this.myRef.setNativeProps({ …
Run Code Online (Sandbox Code Playgroud)

reactjs react-native react-native-android

5
推荐指数
1
解决办法
164
查看次数

Gradle 无法通过 Nexus 解决依赖关系,但可以在浏览器中下载工件

Gradle 无法通过 Nexus Repository 解决依赖关系,因为工件可以通过浏览器下载。我有以下错误

错误:找不到 ecj.jar (org.eclipse.jdt.core.compiler:ecj:4.6.1)。在以下位置搜索: http://infynexus/nexus/content/groups/Manoj.P04/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.jar

但是这个jar可以在浏览器中下载 Chrome Screenshot

构建.gradle

buildscript {
    repositories {
        maven {
            credentials {
                username mavenUser
                password mavenPassword
            }
            url 'http://infynexus/nexus/content/groups/Manoj.P04/'
        }

    }


    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

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

allprojects {
    repositories {
        maven {
            credentials {
                username mavenUser
                password mavenPassword
            }
            url 'infynexus/nexus/content/groups/Manoj.P04/'
        }

        task clean(type: Delete) {
            delete rootProject.buildDir
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

gradle.properties …

android nexus sonatype gradle android-studio

3
推荐指数
1
解决办法
4107
查看次数