相关疑难解决方法(0)

无法从Windows上的资产index.android.bundle加载脚本

我正试图在我的设备上第一次运行我的第一个React Native项目(Android 4.2.2).

我得到:

无法从资产index.android.bundle加载脚本

我使用的命令:

  1. cd (project directory)
  2. react-native start
  3. react-native run-android

android react-native react-native-android

333
推荐指数
18
解决办法
29万
查看次数

错误:与依赖项'com.google.code.findbugs:jsr305'冲突

我在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

238
推荐指数
7
解决办法
10万
查看次数

[react-native]无法连接到android上的开发服务器

当我运行"react-native run-android"时,它给了我错误:"无法连接到开发服务器......".

  • 包服务器正在运行,我可以直接从移动设备中的浏览器访问它.
  • 连接到计算机的我的android设备启用了调试,我使用adb devices命令检查了它.
  • 我的Android版本是4.4.4所以我不能使用adb reverse命令.
  • 我在Dev设置中设置了ip地址和端口.
  • Usb调试已打开.
  • 操作系统是windows7.

那么如何修复红色错误屏幕问题?任何建议表示赞赏!

在此输入图像描述

android react-native

50
推荐指数
10
解决办法
7万
查看次数

Gradle Sync失败 - Android Studio 2.3.1

我的代码在更新之前工作正常.但在我更新到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)

java android

4
推荐指数
1
解决办法
1万
查看次数

Android Studio 2.2在创建新项目时出错

我刚刚更新了我的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)

在此输入图像描述

android android-studio-2.2

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