我正试图在我的设备上第一次运行我的第一个React Native项目(Android 4.2.2).
我得到:
无法从资产index.android.bundle加载脚本
我使用的命令:
cd (project directory)react-native startreact-native run-android我在Android Studio 2.2 Preview 1中使用Android App和Backend模块在Google Messaging中创建了一个新项目.这是应用程序文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.xxx.xxx"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:23.4.0'
compile project(path: ':backend', configuration: 'android-endpoints')
}
Run Code Online (Sandbox Code Playgroud)
但它给了:
错误:与依赖项'com.google.code.findbugs:jsr305'冲突.app(1.3.9)和测试app(2.0.1)的已解决版本有所不同.有关详细信息,请参阅http://g.co/androidstudio/app-test-app-conflict.
我是Android的新手,无法找到这个错误.我如何解决它?
gradle google-cloud-messaging android-studio build.gradle android-gradle-plugin
当我运行"react-native run-android"时,它给了我错误:"无法连接到开发服务器......".
那么如何修复红色错误屏幕问题?任何建议表示赞赏!
我的代码在更新之前工作正常.但在我更新到2.3.1后,它开始出现以下错误,
Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the …Run Code Online (Sandbox Code Playgroud) 我刚刚更新了我的android工作室
Android Studio 2.2 Build#AI-145.3276617,建于2016年9月15日JRE:1.8.0_76-release-b03 x86_64 JVM:JetJrains sro的OpenJDK 64位服务器VM
现在,当我创建一个新项目时,我遇到了构建错误.
Error:Failed to resolve: javax.inject:javax.inject:1 <a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Run Code Online (Sandbox Code Playgroud)