以下是我的清单
:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.payne.simpletestapp">
<uses-permission android:name="android.permission.VIBRATE" />
<!-- GPS + OSMDroid -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivities.Home"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<!--
TODO : add an ACTION-VIEW INTENT FILTER (to allow for Google to search for app)
https://stackoverflow.com/questions/34367875/android-adding-at-least-one-activity-with-an-action-view-intent-filter-after-u
-->
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivities.MainActivity"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".DeviceStorage.SettingsActivity"
android:label="@string/title_activity_settings" />
<activity android:name=".Authentification.AuthUIActivity" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!-- TODO: Firebase Cloud Messaging -->
<!-- [START fcm_default_icon] -->
<!--
Set custom default icon. This is used when no icon is set for incoming notification messages.
See README(...) for more.
-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/logo_couleur_icon" />
<!--
Set color used with incoming notification messages. This is used when no color is set
for the incoming notification message. See README(...) for more.
-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent" />
<!-- [END fcm_default_icon] -->
<!-- [START fcm_default_channel] -->
<!-- TODO: For default_notif_chans, see: https://medium.com/exploring-android/exploring-android-o-notification-channels-94cd274f604c -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/default_notification_channel_id" /> <!-- TODO: Add default notif channel id -->
<!-- [END fcm_default_channel] -->
<service
android:name=".Notifications.Firebase.MyFirebaseMessagingService"
android:enabled="true"
android:exported="true"> <!-- TODO: make sure "enabled" and "exported" are necessary -->
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".Notifications.Firebase.MyJobService"
android:exported="false">
<intent-filter>
<action android:name="com.firebase.jobdispatcher.ACTION_EXECUTE" />
</intent-filter>
</service>
<activity android:name=".Notifications.Firebase.NotifTestActivity"></activity>
</application>
</manifest>
我得到的错误如下:
java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml does not exist. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.payne.simpletestapp"
minSdkVersion 16
targetSdkVersion 27
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// TODO: revert 'api' to 'implementation' (checks relative dependencies)
// Firebase Authentication
api 'com.google.firebase:firebase-auth:16.0.2'
api 'com.firebaseui:firebase-ui-auth:4.1.0'
api 'com.google.firebase:firebase-core:16.0.1'
api 'com.google.android.gms:play-services-auth:15.0.1'
// Firebase Cloud Messaging (Notifications)
api 'com.google.firebase:firebase-messaging:17.1.0'
api 'com.firebase:firebase-jobdispatcher:0.8.5'
// OSMDroid (Map)
api 'org.osmdroid:osmdroid-android:6.0.1'
api 'org.osmdroid:osmdroid-wms:6.0.1'
api 'org.osmdroid:osmdroid-mapsforge:6.0.1'
api 'org.osmdroid:osmdroid-geopackage:6.0.1'
api 'com.github.MKergall:osmbonuspack:6.5.1' // Historical Pin Clusters
// Spring Android
api 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
api 'org.apache.httpcomponents:httpclient-android:4.3.5'
// JSON @ https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
api 'com.fasterxml.jackson.core:jackson-databind:2.9.6'
// Animations et Images
api 'com.squareup.picasso:picasso:2.71828'
api 'com.github.faruktoptas:FancyShowCaseView:1.0.1'
api 'com.daimajia.easing:library:2.0@aar'
api 'com.daimajia.androidanimations:library:2.3@aar'
// @Getters/@Setters
compileOnly 'org.projectlombok:lombok:1.18.0'
annotationProcessor 'org.projectlombok:lombok:1.18.0'
}
repositories {
maven {
url 'https://repo.spring.io/libs-milestone'
}
}
apply plugin: 'com.google.gms.google-services'
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="google_play_services_version">0</integer>
</resources>
是的,我的班以前也工作过。我做了一些重构,但没有改变我的类背后的逻辑,也没有调用任何新的东西。
确保版本号是正确的和最新的(在app
依赖项和module
gradle实现中),并重新同步项目。
当然,这是我的错误,但我看不到它和我的理解的差距。谢谢!
试图利用Java Web Start。我有一个签名的jar(在修改清单和重建后签名)、jnlp,所有这些都放在一个非本地主机服务器上。 jnlp看起来是这样的: 罐子清单具有以下内容: 启动jnlp会出现以下错误: 由于主jar中缺少“权限”清单属性,您的安全设置已阻止应用程序运行。 但我在那儿!那么,有什么问题吗?
我有一个将数据源导出为OSGi服务的数据源功能: 作为创建和注册此数据源服务的ds功能的一部分,它还包含一个ping ds捆绑包,我可以使用它来测试数据源: 我有一个使用该数据源的蓝图包: 当我执行<code>功能:安装foo datasource测试功能 它似乎在抱怨它找不到已安装的OSGi服务的数据源: 奇怪的是,除了我编写的ping ds命令工作正常之外,如果我只安装了它抱怨的特性中的测试包
这就是我遇到的错误 下面是下面的代码。 代码在STS Workspace上运行良好,但无法在CodeChef上运行
在 TFS 中分支后,VS2015 更新 2 缺少对所有 Nuget 包的引用。包还原显示“已安装 packages.config 中列出的所有包”。 我可以手动添加对\包文件夹中所有包的引用,但为什么VS还没有检查那里?
我正在我的掌舵图中编辑configmap.yaml,但是当我登录到我的一个豆荚检查它是否被应用时,它并没有反映我的更改。我对掌舵图表相当陌生,所以任何帮助都很感激。