0

Hy Everybody!

I am starting to learn android development and I would like to try my applications on my HTC (wildfire s) android device(smartphone). My big big problem is a can't do that. The intellij provide the following after i am clicking a run button:

Waiting for device.  
Target device: SH1A3TR00615  
Uploading file  
    local path: D:\javas\MyActivity\out\production\MyActivity\MyActivity.apk  
    remote path: /data/local/tmp/com.example.MyActivity  
Installing com.example.MyActivity  
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.MyActivity"  
pkg: /data/local/tmp/com.example.MyActivity  
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]

I am - using IntelliJ,
- installed HTC Sync
- installed Android SDK Tools(1.16)
- installed ADBDriver

The way how I am creating and running my first app:
File->new project
In the popup window I choose - under android secion - Application Module
Project SDK: Android 4.4 Platform(java version 1.7.0_45)
At more settings Project format: .idea(directory based)
...and my project created, there is an AndroidMainfest.xml, the src folder, and some other file and folder too.

My AndroidMainfest.xml looks:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.MyActivity"
          android:versionCode="1"
          android:versionName="1.0">
    <uses-sdk android:minSdkVersion="19"/>
    <application android:debuggable="true" android:label="@string/app_name" android:icon="@drawable/ic_launcher">
        <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>

When I am click on the android icon at the bottom, it opens a window and I see a "running rows" when I am touching my phone, so I suppose the IntelliJ known about my phone.
I tried to exit and start Intellij again, but the probel was still there.

If I choose a target device at startup "Choose a running device", I see there my phone, but: Compatible: no

Please somebody help me to get started android developing on my device....

4

2 回答 2

0

您需要将您的 uses-sdk android:minSdkVersion="19" 更改为 uses-sdk android:minSdkVersion="16" 并将您的编译器设置为 1.6(您可以在设置 - 编译器 - Java 编译器下找到它 - 然后选择 1.6 (项目字节码版本(右侧))。

希望这可以帮助

于 2014-03-07T17:15:47.663 回答
0

在我看来,该错误就像您的内部存储器缺少足够的空间。您可能需要在内部清理一些数据,然后才能将 apk 刷入设备。或者,您可以使用位于列出的路径中的该 apk,并通过安装您的 sd 卡,假设您的手机中有一个外部 microSD,在从手机手动安装之前将其放置在那里。

于 2013-12-11T21:55:58.450 回答