简体   繁体   中英

Android Studio recognizes ONE but NOT another connected device

I started using Android Studio (AS) last week. I made a working app for my phone. I now want to run it on a tablet. AS doesn't see that it's connected. Logcat says "device not found".

I've done a ton of research to no avail. My question is, "What do I have to do to make AS see my connected device?"

I'm listing everything that I can imagine is relevant.

  • Windows Explorer does see it and Device Manager calls it a "portable device". I asked to update its driver and device mgr tells me I have the latest.
  • When I connect each device, the top of each device screen says "Connected as a media device" and "USB DDebugging connected."
  • In DOS I did adb devices and the phone does show but not the tablet.
  • Device manager calls BOTH devices "Portable devices" but it ONLY calls the phone an "ADB Interface".

I went to Android Developers Forum to ask about this. Never been there before. Here's what it says:

New here? If you're just starting with Android application development and have a beginner-level question, consider asking it on Stack Overflow.

So here I am, looking for the same kind of help as these SO threads that I followed but didn't help:

Here's AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.dov.tablet" >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        android:targetSdkVersion="17"
        <activity
            android:name=".MyActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Here's gradle.build:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 17
    buildToolsVersion "19.1.0"
    defaultConfig {
        applicationId "com.example.dov.tablet"
        minSdkVersion 17
        targetSdkVersion 17
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
 dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

I've done everything I can think of but the device just can't be recognized.

Can anybody give me a hint about what to do next?

Funny thing.... all I had to do was visit another five Google links and I got my own solution.

I found it here .

The problem: even though device manager "saw" the device, Windows couldn't find drivers to make the tablet (a Verizon Ellipsis) become a phone .

The drivers are hidden on the device.

Pull down the top message (notification) bar on the device and look for how it's connected. Click that area and check the "Built-in CD-ROM Drive" box under "Connect as CD-ROM".

In Windows Explorer, find that "CD-ROM drive" and run "Install.bat". It might fail because of unsigned drivers. Click "install anyway" each time you're prompted (maybe four times). After batch file finishes, check Device Manager for no errors.

AS might not be happy yet, saying there is a device but it's off-line. Look on the device screen. It may be asking for confirmation that it's OK to connect. Accept.

....................................

If that doesn't work:

  1. Shut down
  2. Hit F8 (or whatever gets to startup options screen on your computer)
  3. Disable Driver Signature Enforcement.
  4. Run Install.bat.

.......................

Pull down the devices notifications and CHANGE THE DEVICE FROM BEING A CD-ROM DRIVE back to being a MEDIA DEVICE .

Load Android Studio and run the app.

My app worked perfectly.

Hooray.

Summary: 在此处输入图片说明

ps Before I realized that you have to change the device back to being a media device, logcat was going nuts trying to figure out what to do with it.

PPS Immediately after the install.bat finished, device manager looked like this: 在此处输入图片说明

If your tablet is a samsung one, install Samsung Kies. It solved my problem ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM