App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW in

本文介绍了解决Android应用在Google检索中出现警告的方法。针对国内环境,可通过修改build.gradle文件中的lintOptions来禁用警告;对于国际化应用,应在AndroidManifest.xml的Activity中添加ACTION-VIEW intent-filter,以提升应用的可检索性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

AndroidManifest 中 application 提示:
App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details. less… (Ctrl+F1)

基于国内的环境,可以在app的build.gradle中直接关闭检索:

	defaultConfig {
       .....
    }

    lintOptions {
        disable 'GoogleAppIndexingWarning'
    }

如果是国际化的app,在activity 中添加action:

	<activity android:name=".activity.MainActivity">
            <intent-filter>
                ...
                <action android:name="android.intent.action.VIEW"/>
                ...
            </intent-filter>
        </activity>
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[16], line 7 4 from sklearn.model_selection import GridSearchCV, train_test_split 5 from sklearn.metrics import r2_score ----> 7 X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.20, random_state=1, stratify=y) 8 # 使用网格搜索拟合 PLS 回归模型 9 pls = GridSearchCV(Pipeline([('pls', PLSRegression())]), 10 {'pls__n_components': [10, 12, 14, 16, 18, 20]}, 11 cv=3, n_jobs=-1, verbose=0) File E:\anaconda\envs\python312\Lib\site-packages\sklearn\utils\_param_validation.py:213, in validate_params.<locals>.decorator.<locals>.wrapper(*args, **kwargs) 207 try: 208 with config_context( 209 skip_parameter_validation=( 210 prefer_skip_nested_validation or global_skip_validation 211 ) 212 ): --> 213 return func(*args, **kwargs) 214 except InvalidParameterError as e: 215 # When the function is just a wrapper around an estimator, we allow 216 # the function to delegate validation to the estimator, but we replace 217 # the name of the estimator by the name of the function in the error 218 # message to avoid confusion. 219 msg = re.sub( 220 r"parameter of \w+ must be", 221 f"parameter of {func.__qualname__} must be", 222 str(e), 223 ) File E:\anaconda\envs\python312\Lib\site-packages\sklearn\model_selection\_split.py:2782, in train_test_split(test_size, train_size, random_state, shuffle, stratify, *arrays) 2779 if n_arrays == 0: 2780 raise ValueError("At least one array required as input") -> 2782 arrays = indexable(*arrays) 2784 n_samples = _num_samples(arrays[0]) 2785 n_train, n_test = _validate_shuffle_split( 2786 n_samples, test_size, train_size, default_test_size=0.25 2787 ) File E:\anaconda\envs\python312\Lib\site-packages\sklearn\utils\validation.py:514, in indexable(*iterables) 484 """Make arrays indexable for cross-validation. 485 486 Checks consistent length, passes through None, and ensures that everything (...) 510 [[1, 2, 3], array([2, 3, 4]), None, <...Sparse...dtype 'int64'...shape (3, 1)>] 511 """ 513 result = [_make_indexable(X) for X in iterables] --> 514 check_consistent_length(*result) 515 return result File E:\anaconda\envs\python312\Lib\site-packages\sklearn\utils\validation.py:457, in check_consistent_length(*arrays) 455 uniques = np.unique(lengths) 456 if len(uniques) > 1: --> 457 raise ValueError( 458 "Found input variables with inconsistent numbers of samples: %r" 459 % [int(l) for l in lengths] 460 ) ValueError: Found input variables with inconsistent numbers of samples: [1, 132]
03-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yechaoa

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值