Issues met when using android studio to debug app
android studio debug tips
backgroud
- Android studio 3.2.1
issues and solutions
-
Gradle project sync failed. Please fix your project and try again
- File - Project structure - project - gradle version = 4.10.3 ,defautt 5.0,and 5.1 also lead same error.
-
Gradle sync failed: Cause: d29vzk4ow07wi7.cloudfront.net:80 failed to respond
- File - Invalidate Cache /restart - invalidate and restart
- open Android Studio
-
Unable to resolve dependency for ':mobile@debug/compileClasspath': Could not download rxjava.jar (io.reactivex.rxjava2:rxjava:2.1.5)
- File - Rsync project with gradle file, mabye proxy network is not stable.
-
Process 'command 'sh'' finished with exit value 255 (state: FAILED) && '/xxx/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/x86_64-linux-android21-clang: no such file or directory'
- build failure
- install ndk r19 https://dl.google.com/android/repository/android-ndk-r19-beta2-darwin-x86_64.zip
- unzip and put in ndk-bundle path as above, you nee backup this ndk-bundle directory
- reopen as, to check ndk version in sdk tools item of sdk manager.
- sync gradle , run app
-
run or debug runngin to fail:transformClassesWithInstantRunForDebug lead fail
- disalbe install run in the preference
-
device run timeout