Hi everyone ( this is my first question, please don't be rude ). I'm a beginner in coding and I have ran into this error in Android Studio : "Gradle project sync failed", and the error is "Error:Cannot read packageName from /Users/sgrumo/Downloads/gvr-android-sdk-master/samples/sdk-treasurehunt/src/main/AndroidManifest.xml"
My manifest is the following :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.vr.sdk.samples.treasurehunt"
android:versionCode="1"
android:versionName="1">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Make accelerometer and gyroscope hard requirements for good head tracking. -->
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- VR feature tags. -->
<uses-feature android:name="android.software.vr.mode" android:required="false"/>
<uses-feature android:name="android.hardware.vr.high_performance" android:required="false"/>
<uses-feature android:name=""
<application
android:allowBackup="true"
android:supportsRtl="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">
<activity
android:name="com.google.vr.sdk.samples.treasurehunt.TreasureHuntActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="com.google.intent.category.CARDBOARD" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 13
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}
}
dependencies {
compile project(':libraries-audio')
compile project(':libraries-base')
compile project(':libraries-common')
}
Double-click AndroidManifest. xml to open it. The Manifest specifies a range of app-level settings, including: Permissions for any device access the functionality requires, such as location, Internet access, phone calling information, and so on.
Every project in Android includes a Manifest XML file, which is AndroidManifest. xml, located in the root directory of its project hierarchy. The manifest file is an important part of our app because it defines the structure and metadata of our application, its components, and its requirements.
Try adding applicationId
in defaultConfig
(build.gradle
):
defaultConfig {
applicationId "com.google.vr.sdk.samples.treasurehunt"
minSdkVersion 13
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With