Code Monkey home page Code Monkey logo

Comments (15)

michaelguo1991 avatar michaelguo1991 commented on August 18, 2024 16

我遇到了同样的问题, log中显示的详细错误为:A problem occurred starting process 'command 'security''
把build.gradle中getPassword方法注释掉后可以运行
image

from githubpopular.

crazycodeboy avatar crazycodeboy commented on August 18, 2024 6

signingConfig signingConfigs.release注掉即可,

 buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            //signingConfig signingConfigs.release
        }
    }

这是因为GitHubPopular签名打包时的设置,更多可参考React Native发布APP之签名打包APK

from githubpopular.

marsrandy avatar marsrandy commented on August 18, 2024 1

终于可以运行了,按照 @michaelguo1991 的方法试了还是报错, 然后按 @crazycodeboy 的方法也还是报错, 但问题应该是打包发布APK的问题,所以我把
gradle.properties 文件和 android/app/build.gradle 文件里,用于打包APK添加的内容全注释掉了,那样再运行 react-native run-android 的时候安全通过了

from githubpopular.

crazycodeboy avatar crazycodeboy commented on August 18, 2024

从log上看应该是环境配置的问题,可以参考@http://stackoverflow.com/questions/32153544/errorcause-buildtoolsversion-is-not-specified

from githubpopular.

hq001a avatar hq001a commented on August 18, 2024

stackoverflow认为不同层级的gradle里写错了,我是直接clone你代码 npm install 然后运行,自己没有动过gradle的代码,所以这个不是问题所在的感觉。

from githubpopular.

crazycodeboy avatar crazycodeboy commented on August 18, 2024

通过npm install把依赖包安装一下

    "react-native-check-box": "^1.0.0",
    "react-native-easy-toast": "^1.0.2",
    "react-native-htmlview": "^0.5.0",
    "react-native-parallax-scroll-view": "^0.19.0",
    "react-native-scrollable-tab-view": "^0.5.3",
    "react-native-sortable-listview": "^0.1.1",
    "react-native-splash-screen": "^1.0.9",
    "react-native-tab-navigator": "^0.3.3"

from githubpopular.

marsrandy avatar marsrandy commented on August 18, 2024

我也是报的这个错误 npm install 完成后,第一次运行 react-native run-android 就出错了,log里还可以看到正下完了guava-18.0.jar 包
Download https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.jar
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:645)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
.......

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred evaluating project ':app'.

    A problem occurred starting process 'command 'security''

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 10 mins 19.574 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

######### Finished executing: react-native.cmd run-android ##########
[Error : 0104] Failed to run the application in Android: Unknown error

from githubpopular.

crazycodeboy avatar crazycodeboy commented on August 18, 2024

@marsrandy 相关依赖包需要完全下载成功后才能编译运行,另外,可以通过AndroidStudio编译运行这样方面查找问题

from githubpopular.

marsrandy avatar marsrandy commented on August 18, 2024

用 Android Studio 打开 GitHubPopular\android 提示错误

  • Gradle 'android' project refresh failed

    Error: CreateProcess error=2, 系统找不到指定文件。
    -_-!

from githubpopular.

crazycodeboy avatar crazycodeboy commented on August 18, 2024

@marsrandy 相应的依赖库没有全部安装?

from githubpopular.

marsrandy avatar marsrandy commented on August 18, 2024

package.json 全都重装过了

from githubpopular.

marsrandy avatar marsrandy commented on August 18, 2024

Android Studio log显示

Consult IDE log for more details (Help | Show Log)
2016-10-25 17:06:45,770 [ 635059] WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'android' is disabled because the project doesn't contain any valid native configurations.
2016-10-25 17:06:45,839 [ 635128] INFO - #com.jetbrains.cidr.lang - Clearing symbols finished in 0 s.
2016-10-25 17:06:45,839 [ 635128] INFO - #com.jetbrains.cidr.lang - Loading symbols finished in 0 s.
2016-10-25 17:06:45,874 [ 635163] INFO - #com.jetbrains.cidr.lang - Building symbols finished in 0 s.
2016-10-25 17:06:45,875 [ 635164] INFO - #com.jetbrains.cidr.lang - Saving symbols finished in 0 s.
2016-10-25 17:08:23,069 [ 732358] INFO - tion.impl.ExecutionManagerImpl - Module 'android' is not backed by gradle
com.intellij.execution.CantRunException: Module 'android' is not backed by gradle

from githubpopular.

crazycodeboy avatar crazycodeboy commented on August 18, 2024

@marsrandy 这是应该是Android Studio 的配置问题你stackoverflow.com一下

from githubpopular.

wangyihang875 avatar wangyihang875 commented on August 18, 2024

@marsrandy 用于打包APK添加的内容具体是哪些?

from githubpopular.

YeomanYe avatar YeomanYe commented on August 18, 2024

@michaelguo1991
你的图片是怎么加进来的啊

from githubpopular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.