在活动映射 xml 中膨胀类片段时出错

2024-02-20

这个项目以前曾经运行过。运行应用程序时,我不断收到 InflateException。

04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime: Process: com.example.ali.googleandroid, PID: 14895
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ali.googleandroid/com.example.ali.googleandroid.MapsActivity}: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class fragment
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at android.app.ActivityThread.-wrap11(ActivityThread.java)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
04-01 12:16:36.102 14895-14895/com.example.ali.googleandroid E/AndroidRuntime:  Caused by: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class fragment

地图活动.java:

package com.example.ali.googleandroid;

import android.Manifest;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationManager;
import android.media.MediaPlayer;
import android.os.Build;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.UiSettings;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;

import java.lang.reflect.Array;
import java.util.ArrayList;


public class MapsActivity extends AppCompatActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener, GoogleMap.OnMyLocationChangeListener, GoogleMap.OnMarkerClickListener {

    private static final int REQUEST_FINE_LOCATION = 0;

    private static int doubleTap =0;

    static GoogleMap mMap;
    MediaPlayer mp;
    GoogleApiClient mGoogleApiClient;
    LocationRequest mLocationRequest;

    static Location myLocation;
    static LocationManager lm;

    LatLng latLng;
    SupportMapFragment mFragment;

    static ArrayList<Double> DataLon;
    static ArrayList<Double> DataLatit;
    static ArrayList<String> DataFirst_Name;
    static ArrayList<String> DataSurname;

    public static boolean closeDown = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mp = MediaPlayer.create(this, R.raw.two_tone_nav);
        loadPermissions(Manifest.permission.ACCESS_FINE_LOCATION, REQUEST_FINE_LOCATION);

        if (!isGooglePlayServicesAvailable()) {
            finish();
        }

        setContentView(R.layout.activity_maps);

        mFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
        mMap = mFragment.getMap();
        mMap.setMyLocationEnabled(true);
        mMap.getUiSettings().setZoomControlsEnabled(true);
        mMap.getUiSettings().setZoomGesturesEnabled(true);


        buildGoogleApiClient();

        mGoogleApiClient.connect();

        lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);

        if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
            // TODO: Consider calling
            //    public void requestPermissions(@NonNull String[] permissions, int requestCode)
            // here to request the missing permissions, and then overriding
            //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
            //                                          int[] grantResults)
            // to handle the case where the user grants the permission. See the documentation
            // for Activity#requestPermissions for more details.
            return;
        }

        myLocation = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
        if (myLocation != null) {
            double latitude = myLocation.getLatitude();
            double longitude = myLocation.getLongitude();

            LatLng latLng = new LatLng(latitude, longitude);
            mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
            mMap.animateCamera(CameraUpdateFactory.zoomTo(20));
            mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(" You are here!"));

        }

        //insert gather data methods
        GatherDataLocLogon();
        GatherUserLogon();


        //*************Add for loop to load all submitted diary entries******************
        for (int i = 0; i < SignInScreen.DEntry.size(); i++) {
            String Lat = SignInScreen.Latit.get(i);
            double DoubleLat = Double.parseDouble(Lat);

            String Long = SignInScreen.Lon.get(i);
            double DoubleLong = Double.parseDouble(Long);

       //     mMap.setOnMarkerClickListener(this);

            LatLng NewLatLng = new LatLng(DoubleLong, DoubleLat);
            mMap.addMarker(new MarkerOptions()
                            .position(new LatLng(DoubleLong, DoubleLat))
                            .title(SignInScreen.ETitle.get(i).toString())
                            .snippet(SignInScreen.DEntry.get(i).toString())
            );

            mMap.moveCamera(CameraUpdateFactory.newLatLng(NewLatLng));
            mMap.animateCamera(CameraUpdateFactory.zoomTo(8));
        }

    }

活动地图.xml:

<AbsoluteLayout xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:background="#619ec9"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <fragment android:id="@+id/map"
        android:name="com.google.android.gms.maps.SupportMapFragment"
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="362dp"
        android:layout_height="323dp" tools:context=".MapsActivity"
         />

    <ImageButton
        android:onClick="CreateDiaryEntry"
        android:layout_width="84dp"
        android:layout_height="84dp"
        android:id="@+id/DiaryEntry"
        android:adjustViewBounds="true"
        android:padding="20dp"
        android:scaleType="fitXY"
        android:layout_alignTop="@+id/trackownlocation"
        android:layout_alignParentEnd="true"
        android:layout_alignBottom="@+id/trackownlocation"
        android:src="@drawable/create_entry"
        android:background="@drawable/button_state4"

        android:layout_alignParentStart="false"
        android:layout_x="267dp"
        android:layout_y="330dp" />

    <ImageButton
        android:onClick="TrackOwnLocation"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:id="@+id/trackownlocation"
        android:src="@drawable/own_location"
        android:adjustViewBounds="true"
        android:padding="20dp"
        android:scaleType="fitXY"
        android:layout_below="@+id/map"
        android:layout_alignParentStart="false"
        android:background="@drawable/button_state2"

        android:layout_x="9dp"
        android:layout_y="429dp" />

    <ImageButton
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:id="@+id/help"
        android:adjustViewBounds="true"
        android:padding="20dp"
        android:scaleType="fitXY"

        android:src="@drawable/help"
        android:background="@drawable/button_state3"
        android:layout_alignTop="@+id/trackownlocation"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="41dp"
        android:layout_x="139dp"
        android:layout_y="431dp" />

    <ImageButton
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:id="@+id/imageButton"
        android:src="@mipmap/settings_icon"
        android:adjustViewBounds="true"
        android:padding="20dp"
        android:scaleType="fitXY"
        android:layout_below="@+id/map"
        android:layout_alignParentStart="false"
        android:background="@drawable/button_state5"
        android:layout_x="8dp"
        android:layout_y="333dp" />

    <ImageButton
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:id="@+id/imageButton2"
        android:src="@mipmap/search_icon"
        android:adjustViewBounds="true"
        android:padding="20dp"
        android:scaleType="fitXY"
        android:layout_below="@+id/map"
        android:layout_alignParentStart="false"
        android:background="@drawable/button_state6"
        android:layout_x="138dp"
        android:layout_y="333dp" />

</AbsoluteLayout>

清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.ali.googleandroid" >
    <!--
         The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
         Google Maps Android API v2, but you must specify either coarse or fine
         location permissions for the 'MyLocation' functionality. 
    -->
    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="23" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <permission
        android:name="com.example.ali.googleandroid.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.example.ali.googleandroid.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.location.GPS_ENABLED_CHANGE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

    <android:uses-permission android:name="android.permission.READ_PHONE_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >

        <!--
             The API key for Google Maps-based APIs is defined as a string resource.
             (See the file "res/values/google_maps_api.xml").
             Note that the API key is linked to the encryption key used to sign the APK.
             You need a different API key for each encryption key, including the release key that is used to
             sign the APK for publishing.
             You can define the keys for the debug and release targets in src/debug/ and src/release/. 
        -->
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <activity android:name=".SignInScreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Entry_Dislplay" >
        </activity>
        <activity android:name=".Diary_Entry" >
        </activity>
        <activity android:name=".Recover_Code" >
        </activity>
        <activity android:name=".SecDialog" >
        </activity>
        <activity android:name=".Create_A_New_Acc" >
        </activity>
        <activity android:name=".ThirDialog" >
        </activity>
        <activity android:name=".Help_Guide" >
        </activity>
        <activity android:name=".PersDialog" >
        </activity>
        <activity android:name=".MapsActivity" >
        </activity>
        <activity android:name=".LogoutDialog" >
        </activity>

    </application>

</manifest>

构建.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    defaultConfig {
        applicationId "com.example.ali.googleandroid"
        minSdkVersion 22
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.google.android.gms:play-services:8.4.0'
}

你应该使用片段class="com.google.android.gms.maps.SupportMapFragment"... 代替android:name="com.google.android.gms.maps.SupportMapFragment"

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在活动映射 xml 中膨胀类片段时出错 的相关文章

  • 如何为俚语和表情符号构建正则表达式 (regex)

    我需要构建一个正则表达式来匹配俚语 即 lol lmao imo 等 和表情符号 即 P 等 我按照以下示例进行操作http www coderanch com t 497238 java java Regular Expression D
  • 字符串数组文本格式化

    我有这个字符串 String text Address 1 Street nr 45 Address 2 Street nr 67 Address 3 Street nr 56 n Phone number 000000000 稍后将被使用
  • 错误:在根项目“projectName”中找不到项目“app”

    我有一个在 Eclipse 中开发的旧应用程序 现在尝试将其迁移到 Android Studio 我更新了库并遵循了基本步骤 现在 我收到此错误 Error Project app not found in root project pro
  • getResourceAsStream() 可以找到 jar 文件之外的文件吗?

    我正在开发一个应用程序 该应用程序使用一个加载配置文件的库 InputStream in getClass getResourceAsStream resource 然后我的应用程序打包在一个 jar文件 如果resource是在里面 ja
  • Java Integer CompareTo() - 为什么使用比较与减法?

    我发现java lang Integer实施compareTo方法如下 public int compareTo Integer anotherInteger int thisVal this value int anotherVal an
  • 如何在控制器、服务和存储库模式中使用 DTO

    我正在遵循控制器 服务和存储库模式 我只是想知道 DTO 在哪里出现 控制器应该只接收 DTO 吗 我的理解是您不希望外界了解底层域模型 从领域模型到 DTO 的转换应该发生在控制器层还是服务层 在今天使用 Spring MVC 和交互式
  • Eclipse Java 远程调试器通过 VPN 速度极慢

    我有时被迫离开办公室工作 这意味着我需要通过 VPN 进入我的实验室 我注意到在这种情况下使用 Eclipse 进行远程调试速度非常慢 速度慢到调试器需要 5 7 分钟才能连接到远程 jvm 连接后 每次单步执行断点 行可能需要 20 30
  • Android Studio - Windows 7 上的 Android SDK 问题

    我对 Google i o 2013 上发布的最新开发工具 Android Studio 有疑问 我已经成功安装了该程序并且能够正常启动 我可以导入现有项目并对其进行编辑 但是 当我尝试单击 SDK 管理器图标或 AVD 管理器图标时 或者
  • 如何从终端运行处理应用程序

    我目前正在使用加工 http processing org对于一个小项目 但是我不喜欢它附带的文本编辑器 我使用 vim 编写所有代码 我找到了 pde 文件的位置 并且我一直在从 vim 中编辑它们 然后重新打开它们并运行它们 重新加载脚
  • .isProviderEnabled(LocationManager.NETWORK_PROVIDER) 在 Android 中始终为 true

    我不知道为什么 但我的变量isNetowrkEnabled总是返回 true 我的设备上是否启用互联网并不重要 这是我的GPSTracker class public class GPSTracker extends Service imp
  • 如何在桌面浏览器上使用 webdriver 移动网络

    我正在使用 selenium webdriver 进行 AUT 被测应用程序 的功能测试自动化 AUT 是响应式网络 我几乎完成了桌面浏览器的不同测试用例 现在 相同的测试用例也适用于移动浏览器 因为可以从移动浏览器访问 AUT 由于它是响
  • Android 套接字和 asynctask

    我即将开始制作一个应该充当 tcp 聊天客户端的应用程序 我一直在阅读和阅读 我得出的结论是最好 如果不需要 将我的套接字和异步任务中的阅读器 问题是我不确定从哪里开始 因为我是 Android 新手 这至少对我来说是一项艰巨的任务 但据我
  • 一次显示两条Toast消息?

    我希望在一个位置显示一条 Toast 消息 并在另一位置同时显示另一条 Toast 消息 多个 Toast 消息似乎总是按顺序排队和显示 是否可以同时显示两条消息 是否有一种解决方法至少可以提供这种外观并且不涉及扰乱活动布局 Edit 看来
  • 捕获的图像分辨率太大

    我在做什么 我允许用户捕获图像 将其存储到 SD 卡中并上传到服务器 但捕获图像的分辨率为宽度 4608 像素和高度 2592 像素 现在我想要什么 如何在不影响质量的情况下获得小分辨率图像 例如我可以获取或设置捕获的图像分辨率为原始图像分
  • 使用 JMF 创建 RTP 流时出现问题

    我正处于一个项目的早期阶段 需要使用 RTP 广播DataStream创建自MediaLocation 我正在遵循一些示例代码 该代码目前在rptManager initalize localAddress 出现错误 无法打开本地数据端口
  • 当我从 Netbeans 创建 Derby 数据库时,它存储在哪里?

    当我从 netbeans 创建 Derby 数据库时 它存储在哪里 如何将它与项目的其余部分合并到一个文件夹中 右键单击Databases gt JavaDB in the Service查看并选择Properties This will
  • android sdk 的位置尚未在 Windows 操作系统的首选项中设置

    在 Eclipse 上 我转到 windows gt Android SDK 和 AVD Manager 然后弹出此消息 Android sdk 的位置尚未在首选项中设置 进入首选项 在侧边栏找到 Android 然后会出现一个 SDK 位
  • 将 List 转换为 JSON

    Hi guys 有人可以帮助我 如何将我的 HQL 查询结果转换为带有对象列表的 JSON 并通过休息服务获取它 这是我的服务方法 它返回查询结果列表 Override public List
  • 如何实现仅当可用内存较低时才将数据交换到磁盘的写缓存

    我想将应用程序生成的数据缓存在内存中 但如果内存变得稀缺 我想将数据交换到磁盘 理想情况下 我希望虚拟机通知它需要内存并将我的数据写入磁盘并以这种方式释放一些内存 但我没有看到任何方法以通知我的方式将自己挂接到虚拟机中before an O
  • 节拍匹配算法

    我最近开始尝试创建一个移动应用程序 iOS Android 它将自动击败比赛 http en wikipedia org wiki Beatmatching http en wikipedia org wiki Beatmatching 两

随机推荐

  • ssh命令输出保存在shell脚本中的文本文件中

    我想编写shell脚本 其中我使用ssh命令 无论我通过 ssh 命令获得什么输出 我都想将其保存在文本文件或变量中 这样我就可以在我的 shell 脚本中使用它 目前我正在将输出保存在变量中 但是当我在 ssh 命令之外使用该变量时 值显
  • Google Maps API - 数组和 InfoWindows 的问题

    抱歉 如果这是微不足道的 但我是 JS 的新手 并且已经解决这个问题几个小时但无济于事 function initialize geocoder new google maps Geocoder var latlng new google
  • 无法为 BigDecimal 定义单例方法“encode_with”

    当尝试更新我的模型之一时 我遇到了异常can t define singleton method encode with for BigDecimal 我正在使用 Rails 3 0 7 和 Ruby 1 9 2 滑板场控制器 def up
  • 在 Perl 中打印 .00001 的解决方法

    我有这个程序 my d 40000 100 360 print At the equator n printf 9s 10 3f meters n 10 10 d for 0 7 它输出 At the equator By the way
  • C++ 已弃用从字符串常量到“char*”的转换

    我有一个私人课程char str 256 为此我有一个显式的构造函数 explicit myClass char func strcpy str func 我称其为 myClass obj example 当我编译这个时 我收到以下警告 已
  • (TableLayout)findViewById(空指针异常

    我整天都在寻找答案 但是当我尝试获取表格布局时 我得到的是空值 我发现信息表明它可能是另一个同名的表格布局 但只有一个 我的 xml 文件 my xml http filebin ca A1sZlhzeV0b 我的代码在这里layout6
  • 通用列表的动态排序标准

    这样做的目的是避免编写大量的 if 语句 这是我当前的代码 public override List
  • 如何在打开新对话框之前关闭所有 jquery ui 对话框?

    我想在打开新对话框之前关闭所有 jquery 对话框 我正在尝试使用以下代码 ui dialog content dialog close 它可以工作 但它也太接近新对话框了 请帮助我任何人 Try ui dialog content no
  • SQL 联合到 NHibernate 标准

    有没有办法将此 SQL 语句转换为 NHibernate Criteria select b1 FieldA as Name b1 FieldA as FullName from Sale b1 where b1 FieldA like j
  • 如何在 React Native 中将图标放入 TextInput 中?

    我正在考虑有这样的事情https android arsenal com details 1 3941 https android arsenal com details 1 3941其中有图标 按下该图标即可将密码显示为纯文本 而不是点
  • 将 Reactstrap 与 Next.js 结合使用

    我正在使用创建一个 React 应用程序Next js我正在尝试使用提供的组件reactstrap 我似乎遇到的问题似乎涉及导入名为的 CSS 文件bootstrap dist css bootstrap min css as the re
  • 如何在javascript中找到多元回归方程

    我搜索了堆栈溢出 但没有找到任何与我的问题真正相同的问题 因为没有一个问题真正具有多个自变量 基本上我有一组数据点 我希望能够找到这些数据点的回归方程 到目前为止 我的代码如下所示 w x z 是自变量 y 是因变量 var dataPoi
  • 将 cocos2d 视图添加到 UIView

    我已将 cocos2d 2 0 集成到现有的 iOS 项目中 并希望能够创建一个视图并将其作为子视图添加到现有视图中 cocos2d 设置代码应该放在哪里以及 cocos2d 视图如何在 UIView 中可见 我已关注雷 文德利希教程 ht
  • Excel 工作簿输入时出现奇怪的错误

    对于当前代码 String currentPath Directory GetCurrentDirectory OpenFileDialog op new OpenFileDialog op InitialDirectory current
  • C# 错误提供程序不适用于组框和选项卡控件中的文本框

    我正在尝试使用错误提供程序来实现 以在继续执行之前验证我的文本框不为空 错误提供程序适用于主窗体上的文本框 但拒绝适用于组框或选项卡控件中的任何文本框或组合框 它不检查文本框 不显示错误或等待用户为正在检查的控件输入文本 选择项目 当然 如
  • 为什么双击单元格时下面的代码不会执行?

    下面的代码较早运行 但在双击单元格时不会执行 Private Sub Worksheet DoubleClick ByVal Target As range Cancel As Boolean If Target Font Bold Fal
  • 如何在 Android 中显示希腊字符?

    如何在 Android 中显示希腊字符 Android 具有完整的 Unicode 支持 显示希腊字符应该非常容易 在 strings xml 文件中 您可以使用希腊字符 这些字符将正确显示 当然 您需要以 UTF 8 格式保存文件
  • 名称 php 的表单验证,包括撇号、空格、连字符和句点

    我很难将正确的表达式组合在一起 因此它会拒绝除字母 句点 撇号 空格和连字符之外的所有内容 到目前为止 这适用于除撇号之外的所有内容 我尝试使用单 和双 来转义撇号 但无济于事 if preg match a zA Z POST name
  • 计算熊猫奇数比的更好方法

    我有一个数据框 counts1 如下所示 Factor w statin wo statin AgeGroups Cancer 0 5 No 108 6575 Yes 0 223 11 15 No 5 3669 Yes 1 143 16 2
  • 在活动映射 xml 中膨胀类片段时出错

    这个项目以前曾经运行过 运行应用程序时 我不断收到 InflateException 04 01 12 16 36 102 14895 14895 com example ali googleandroid E AndroidRuntime