Skip to content

Instantly share code, notes, and snippets.

@bburdiliak
Last active February 20, 2017 13:50
Show Gist options
  • Save bburdiliak/2fc51e7c243754e55844c80759cd372d to your computer and use it in GitHub Desktop.
Save bburdiliak/2fc51e7c243754e55844c80759cd372d to your computer and use it in GitHub Desktop.
react native / android
* start android virtual device
android avd
* list all SDKs
android list sdk -a
* install 3rd SDK from that list
android update sdk -a -u -t 3
* Linux-based systems support VM acceleration through the KVM software package, check availability of KVM
kvm-ok
* run app with android
react-native android-run
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
Unknown source file : at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
Unknown source file : at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
Unknown source file : at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
Unknown source file : at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file : at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file : at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file : at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file : at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file : at com.android.dx.command.Main.main(Main.java:106)
:app:dexDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-openjdk-amd64/bin/java'' finished with non-zero exit value 2
* 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: 4 mins 4.977 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.
Go to https://facebook.github.io/react-native/docs/getting-started.html
and check the Android tab for setup instructions.
==> https://github.com/EstebanFuentealba/react-native-share/issues/41
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session : -26: Package com.adwrap new target SDK 22 doesn't support runtime permissions but the old target SDK 25 does.
===> uninstall old app (with never SDK version) and install it once again (build with older SDK)
(https://stackoverflow.com/questions/34958959/andorid-studio-2-0-preview-5-error-during-launch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment