adb backup with build tools v23 fails - android

I'm trying to view files saved to the internal sdcard on my Android device in order to debug my application.
I used to be able to use adb backup to this this. I just upgraded to Build Tools v23, and now when I try to run adb backup from Terminal in OSX, I get a 'Bus error: 10' response and no backup.
Any ideas?

This has been fixed in ADB Build Tools 23.0.1.

Check out your build.gradle file and make the changes as below,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.example.inzi.app"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
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.0.0'
}
Check for the compileSdkVersion (should be 23), buildTiilVersion (should be 23) and also the dependencies ('com.android.support:appcompat-v7:23.0.0')...
Let me know if it works...
And mark it as an answer so that it would be useful to others...

Related

Unable to use breakpoints in Android Studio

I just installed the latest version of Android Studio, my computers OS is Windows 10 x64.
The problem is that for some reason Android Studio wont hit the breakpoints.. no matter if I use my nexus 10 with USB-debugging enabled, or if I use a VM.. however.. the app gets "published" to the selected device and launched.
This is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.xxxx.xxxx"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
debuggable true
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
}
Any ideas?
I have Unity3D installed on the same machine but there is currently no process thats associated with Unity3D running.. and adb devices do list the connected device(s)..
I have also tried to run adb kill-server and adb start-server.. but that didnt do it either..
Br,
Inx

how to use marshmallow in Android studio

I am using Android studio and i want to use Marshmallow API and AppCompatActivity. When I created a new project the build.gradle contained the below lines but I receive error at R class which says not a symbol.
Please let me know how to correct the build.gradle to get the App work.
gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.com.myapplication"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
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.0.1'
}
Click on Build->Clean Project and that will perform a gradle clean
Update your Android SDK Manager Install all component of Android 6.0 (API 23)
R file can be erased due to many reasons, try rebuilding your project(which is the most common issue) and other issues may include any syntax error or inappropriate file permissions in work space, the exact error report can help address the issue better.

package name is not determined in android studio

i am using Android studio 1.5. and at when i click run i receive
unable to determine package name
i checked the manifest file and it is as shown in the image below...but i do not know why the activities are marked with red even the app name and the icon
as well.
please let me know how to fix this
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.com.bt_11"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
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.0.1'
}
I followed the same steps as user2121 and eventually tried downgrading to Android Studio 1.4.1. Unlike user2121, I still got an error, however it was different than when on 1.5.1.
AndroidManifest.xml file not found
Upon searching for this new error, I found this StackOverflow answer which solved the problem for me on 1.5.1 as well as 1.4.1.

Gradle build fails on android studio 1.2

I am trying to import some libraries, in Android Studio. I had the following error message:
Error:The SDK Build Tools revision (17.0.0) is too low for project ':actionbarsherlock'. Minimum required is 19.1.0
So i installed Android SDK Build tools rev 19.1.0. I modified build.gradle file (app) looking like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.example.xx.xx"
minSdkVersion 16
targetSdkVersion 19
versionCode 1
versionName "1.2"
}
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:19.1.0'
compile 'com.android.support:support-v4:19.1.0'
compile project(':actionbarsherlock')
compile project(':actionbarsherlock-fest')
compile project(':actionbarsherlock-i18n')
}
Also in Run/Debug Configurations, under App Engine DevAppServer, i set in App Engine SDK field the path for the new SDK, looks like that: C:\Users\cami\AppData\Local\Android\sdk\build-tools\19.1.0
So when i am trying to rebuild, i get exactly the same error message as before. Additionally, i had installed Android SDK Build tools rev 22.0.1, and i get warning saying update targetSdkVersion to 22.
Could please someone help me with this?
PS: Sorry for the very long post, and maybe for the many unnecessary details, but i am new in Android Dev.
Thank you
I had similar problem. Please try my code from gradle:
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "esub.android.app"
minSdkVersion 17
targetSdkVersion 19
versionCode 5
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Hope it will help.
Do you have installed all required SDK?
Please look at my Android SDK Manager:

Android Studio minSdkVersion not working

The minSdkVersion directive in my build.gradle appears not to be working (Android Studio 0.8.2)
Here's the build.gradle for the "mobile" module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services-wearable:+'
}
When I try to debug it on my Samsung Galaxy S4 (API 19) I see this message in the "Compatible" column:
"No, minSdk(API 20) > deviceSdk(API 19)"
Minimum SDK should clearly be 9 as specified by the build.gradle. If I try to launch it anyway I get:
"Failure [INSTALL_FAILED_OLDER_SDK]"
I've scoured this project for any indication of something that could force the minSdk to 20. Nothing in AndroidManifest.xml. This project is a wearable app.
I've built another wearable app on the same machine and it loads and runs on the Samsung without a problem. This app that I'm trying to use was put together by a friend. It has only a small amount of code. The build.gradles are identical.
Totally baffled. Please help!
Android L version (SDK 20) will be overrides minSdkVersion to 20. You should change your build version to 19 or below version of SDK. for example,
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "example.myapplication"
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:19.+'
}
Modify your build.gradle file like this, and resync your project and rebuild it.
also you should install 19.1 sdk libraries to using SDK Managers. Run android studio as administrator will be help to solve another problems when you install sdk and rebuild your project.
you can change compileSdkVersion 20 to compileSdkVersion 16 to have a try ,it works to me

Categories

Resources