Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':react-native-nested-scroll-view:compileReleaseJavaWithJavac' #9

Open
Th3Ov3r opened this issue Feb 15, 2018 · 8 comments

Comments

@Th3Ov3r
Copy link

Th3Ov3r commented Feb 15, 2018

I have this problem, when building Android project on react native, can you help me please.
I am sorry for my english. i am speak spanish.

:react-native-nested-scroll-view:compileReleaseJavaWithJavac :react-native-nested-scroll-view:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactHorizontalNestedScrollContainerViewManager.java:3: error: cannot find symbol import com.facebook.react.views.scroll.ReactHorizontalScrollContainerViewManager; ^ symbol: class ReactHorizontalScrollContainerViewManager location: package com.facebook.react.views.scroll C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactHorizontalNestedScrollContainerViewManager.java:6: error: cannot find symbol extends ReactHorizontalScrollContainerViewManager { ^ symbol: class ReactHorizontalScrollContainerViewManager C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactNestedScrollView.java:40: error: cannot find symbol import com.facebook.react.views.view.ReactViewBackgroundManager; ^ symbol: class ReactViewBackgroundManager location: package com.facebook.react.views.view C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactNestedScrollView.java:72: error: cannot find symbol private ReactViewBackgroundManager mReactBackgroundManager; ^ symbol: class ReactViewBackgroundManager location: class ReactNestedScrollView C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactHorizontalNestedScrollContainerViewManager.java:10: error: method does not override or implement a method from a supertype @Override ^ C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactNestedScrollView.java:81: error: cannot find symbol mReactBackgroundManager = new ReactViewBackgroundManager(this); ^ symbol: class ReactViewBackgroundManager location: class ReactNestedScrollView C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactNestedScrollViewManager.java:145: error: method does not override or implement a method from a supertype @Override ^ C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\RNNestedScrollViewPackage.java:21: error: method asList in class Arrays cannot be applied to given types; return Arrays.<ViewManager>asList( ^ required: T[] found: ReactNestedScrollViewManager,ReactHorizontalNestedScrollViewManager,ReactHorizontalNestedScrollContainerViewManager reason: varargs mismatch; ReactHorizontalNestedScrollContainerViewManager cannot be converted to ViewManager where T is a type-variable: T extends Object declared in method <T>asList(T...) Note: C:\Users\frankito\Documents\ReactNative\AwesomeProject\node_modules\react-native-nested-scroll-view\android\src\main\java\com\rnnestedscrollview\ReactNestedScrollViewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 8 errors :react-native-nested-scroll-view:compileReleaseJavaWithJavac FAILED

here my package.json

{ "name": "AwesomeProject", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "react": "16.0.0-alpha.12", "react-native": "0.47.1", "react-native-collapsing-toolbar": "^1.0.0-beta.8", "react-native-elements": "^0.18.5", "react-native-nested-scroll-view": "^6.0.1", "react-native-progress": "^3.4.0", "react-native-scrollable-tab-view": "^0.8.0", "react-native-vector-icons": "^4.4.2", "react-navigation": "^1.0.0-beta.21", "react-redux": "^5.0.6", "redux": "^3.7.2" }, "devDependencies": { "babel-jest": "20.0.3", "babel-preset-react-native": "2.1.0", "jest": "20.0.4", "react-test-renderer": "16.0.0-alpha.12" }, "jest": { "preset": "react-native" } }

@cesardeazevedo
Copy link
Owner

Hi, i am not sure on whats going on there, but can you post your app/build.gradle file?

@Th3Ov3r
Copy link
Author

Th3Ov3r commented Feb 16, 2018

`apply plugin: "com.android.application"

import com.android.build.OutputFile

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

/**

  • Set this to true to create two separate APKs instead of one:
    • An APK that only works on ARM devices
    • An APK that only works on x86 devices
  • The advantage is the size of the APK is reduced by about 4MB.
  • Upload all the APKs to the Play Store and people will download
  • the correct one based on the CPU architecture of their device.
    */
    def enableSeparateBuildPerCPUArchitecture = false

/**

  • Run Proguard to shrink the Java bytecode in release builds.
    */
    def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.awesomeproject"
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}
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-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
compile project(':react-native-collapsing-toolbar')
compile project(':react-native-nested-scroll-view')
}

// 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'
}
`

@cesardeazevedo
Copy link
Owner

Can you set the compileSdkVersion and targetSdkVersion to 25, as following the build.gradle on the example project?

@Th3Ov3r
Copy link
Author

Th3Ov3r commented Feb 16, 2018

I understand what I will do, I can establish this manually or it is necessary
start another project, excuse me, I'm new to react native.

@Th3Ov3r
Copy link
Author

Th3Ov3r commented Feb 16, 2018

It did not work, the same problem. Here my file gradle
https://github.com/Th3Ov3r/DeliveyApp/blob/master/AwesomeProject/android/app/build.gradle

@Th3Ov3r Th3Ov3r closed this as completed Feb 16, 2018
@Th3Ov3r Th3Ov3r reopened this Feb 16, 2018
@cesardeazevedo
Copy link
Owner

Ok, now i see, it won't work with react-native 0.47.0, you should use react-native 0.51 or higher.

@Th3Ov3r
Copy link
Author

Th3Ov3r commented Feb 17, 2018

Ok, i am undestand, I'll try with that

@ignivaravinderrikhi
Copy link

how to make it work on react native 0.48.4 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants