我想用机器人工作室以下this tutorial做一个启动画面。
当我运行命令“反应原生运行Android的”我的应用程序拒绝运行,出现此错误:
:建立失败,一个例外。
- 出了什么问题:执行失败的任务“:应用程序:transformClassesWithDexBuilderForDebug”。 com.android.build.api.transform.TransformException:com.android.builder.dexing.DexArchiveBuilderException:com.android.builder.dexing.DexArchiveBuilderException:无法处理C:\用户\ veget.gradle \缓存\变换-1 \文件-1.1 \ exoplayer核心 - 2.9.1.aar \ 472ffc49d344965c2b0eac59f4adcc13 \罐\ classes.jar
- 试试看:--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项来运行,以获得更多的日志输出。与--scan运行得到充分的认识。
- 获取在https://help.gradle.org更多帮助
未能787-8 89可操作的任务:1执行,88上最新的设备上无法安装应用程序,阅读上面的内容错误。确保你有一个Android模拟器运行或连接,并建立了自己的Android开发环境的设备:https://facebook.github.io/react-native/docs/getting-started.html
我应该怎么做,推出我的手机我的应用程序?
转到Android Studio中选择生成/重建项目。尝试同步你的项目之前应该that.That解决这一问题。
添加下面的代码在你的应用程序级的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.0.0'
}
}