Comments (15)
我遇到了同样的问题, log中显示的详细错误为:A problem occurred starting process 'command 'security''
把build.gradle中getPassword方法注释掉后可以运行
from githubpopular.
将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.
终于可以运行了,按照 @michaelguo1991 的方法试了还是报错, 然后按 @crazycodeboy 的方法也还是报错, 但问题应该是打包发布APK的问题,所以我把
gradle.properties 文件和 android/app/build.gradle 文件里,用于打包APK添加的内容全注释掉了,那样再运行 react-native run-android 的时候安全通过了
from githubpopular.
从log上看应该是环境配置的问题,可以参考@http://stackoverflow.com/questions/32153544/errorcause-buildtoolsversion-is-not-specified
from githubpopular.
stackoverflow认为不同层级的gradle里写错了,我是直接clone你代码 npm install 然后运行,自己没有动过gradle的代码,所以这个不是问题所在的感觉。
from githubpopular.
通过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.
我也是报的这个错误 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.
@marsrandy 相关依赖包需要完全下载成功后才能编译运行,另外,可以通过AndroidStudio编译运行这样方面查找问题
from githubpopular.
用 Android Studio 打开 GitHubPopular\android 提示错误
- Gradle 'android' project refresh failed
Error: CreateProcess error=2, 系统找不到指定文件。
-_-!
from githubpopular.
@marsrandy 相应的依赖库没有全部安装?
from githubpopular.
package.json 全都重装过了
from githubpopular.
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.
@marsrandy 这是应该是Android Studio 的配置问题你stackoverflow.com一下
from githubpopular.
@marsrandy 用于打包APK添加的内容具体是哪些?
from githubpopular.
@michaelguo1991
你的图片是怎么加进来的啊
from githubpopular.
Related Issues (20)
- 请问,为什么不能import PermissionsAndroid?
- In iOS ,when I down the code ,and then user command : react-native-git-upgrade ,and then has error:Cannot find entry file index.js in any of the roots
- 运行出错,初始化了 npm i,然后运行 react-native run-android,却报如下错误,大神如何处理呢 HOT 6
- [Error][ios]Print: Entry, ":CFBundleIdentifier", Does Not Exist HOT 3
- 在react-native run-android的时候,出现下面的报错,是什么问题?麻烦帮忙看看,谢谢 HOT 3
- run-android时报错,提示修改版本,但是修改后还是这个错
- * What went wrong: Execution failed for task ':react-native-splash-screen:processReleaseResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. HOT 1
- Execution failed for task ':u_share:processReleaseResources'.
- java.io.IOException: Cannot run program "security" (in directory "D:\GitHubPopular\android\app") HOT 2
- 打包发布版本性能一般
- react-native versin?
- 我的编译时报以下错误,求大神解答
- redux相关的文章没有发布到您的博客中吗
- 在windows下执行react-native run-android报错 HOT 1
- 你这个代码不是最新的代码吧 都没用到React Navigation
- 基于最新版react-native和react-navigation模仿老师的APP
- GitHubTrending包的问题 HOT 2
- app permission HOT 1
- run-android就会报这个错, 我的java版本是1.8.0_231, 模拟器是夜神. (在官网脚手架的demo中会自动打开as中的模拟器, 但是这里失效了)
- react-native run-ios报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from githubpopular.